more debug messages when failing to create a surface.

multiple persons reported assertion failures due to surfaces being null.
This commit is contained in:
gfgtdf 2020-04-19 18:34:19 +02:00 committed by GitHub
parent 55bebf6969
commit 6cdf6525e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,6 +47,9 @@ surface::surface(int w, int h)
neutral_pixel_format.Bmask,
neutral_pixel_format.Amask);
#endif
if(!surface_) {
std::cerr << "Failed ot create a surface of size, " << w << "x" << h << " Reason: " << SDL_GetError() << "\n";
}
}
bool surface::is_neutral() const