added constructor for external surfaces
This commit is contained in:
parent
027b9ba84a
commit
84a196ab1a
@ -35,3 +35,7 @@ Image::Image(const std::string& path) {
|
||||
if (!loaded) throw std::runtime_error(IMG_GetError());
|
||||
_s.reset(loaded);
|
||||
}
|
||||
|
||||
Image::Image(SDL_Surface* surface) {
|
||||
_s.reset(surface);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user