Only expose the OpenGL flag to SDL 1.2 if it was requested.
authorSam Lantinga <slouken@libsdl.org>
Sat, 12 Feb 2011 08:17:37 -0800
changeset 5267 93ea62a5ba8f
parent 5266 e107518710f6
child 5268 c5a04f3c3908
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
--- a/src/SDL_compat.c	Sat Feb 12 07:57:35 2011 -0800
+++ b/src/SDL_compat.c	Sat Feb 12 08:17:37 2011 -0800
@@ -519,7 +519,7 @@
     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) {