changeset 216:e2a10730ae94

Fail if setting a video mode when requesting GL and can't get it.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 25 Oct 2001 06:22:38 +0000
parents 041cd6816a05
children add626b825bb
files src/video/SDL_video.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_video.c	Thu Oct 25 06:08:18 2001 +0000
+++ b/src/video/SDL_video.c	Thu Oct 25 06:22:38 2001 +0000
@@ -616,6 +616,10 @@
 	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