mirror of
https://github.com/yawut/SDL.git
synced 2026-08-27 19:24:30 -05:00
Fail if setting a video mode when requesting GL and can't get it.
This commit is contained in:
@@ -616,6 +616,10 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
|
||||
if ( mode ) { /* Prevent resize events from mode change */
|
||||
SDL_PrivateResize(mode->w, mode->h);
|
||||
}
|
||||
/* Sam - If we asked for an OpenGL mode, but didn't get it, fail */
|
||||
if ( is_opengl && !(mode->flags & SDL_OPENGL) ) {
|
||||
mode = NULL;
|
||||
}
|
||||
/*
|
||||
* rcg11292000
|
||||
* If you try to set an SDL_OPENGL surface, and fail to find a
|
||||
|
||||
Reference in New Issue
Block a user