From f7ee7b8aae109454a1095ae6207db04b82cbbf6b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 12 Feb 2011 08:17:37 -0800 Subject: [PATCH] Only expose the OpenGL flag to SDL 1.2 if it was requested. The window flags mean the window is OpenGL capable. The surface flag means that the surface is a stub surface representing a window that has an OpenGL context attached. --- src/SDL_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SDL_compat.c b/src/SDL_compat.c index 670b1858f..cabf7747a 100644 --- a/src/SDL_compat.c +++ b/src/SDL_compat.c @@ -519,7 +519,7 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags) if (window_flags & SDL_WINDOW_FULLSCREEN) { surface_flags |= SDL_FULLSCREEN; } - if (window_flags & SDL_WINDOW_OPENGL) { + if ((window_flags & SDL_WINDOW_OPENGL) && (flags & SDL_OPENGL)) { surface_flags |= SDL_OPENGL; } if (window_flags & SDL_WINDOW_RESIZABLE) {