Navigation Menu

Skip to content

Commit

Permalink
Fail if setting a video mode when requesting GL and can't get it.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 25, 2001
1 parent 6b178c9 commit 3588002
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -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
Expand Down

0 comments on commit 3588002

Please sign in to comment.