From 36090f576fb35a4d28195824a5f2aa8d0c5db261 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Thu, 26 Nov 2015 02:13:15 -0500 Subject: [PATCH] WinRT: bug-fix, OpenGLES2 was failing to init, after recent windowing fixes Some SDL_Window flags were getting lost inside WINRT_UpdateWindowFlags, namely SDL_WINDOW_OPENGL. --- src/video/winrt/SDL_winrtvideo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video/winrt/SDL_winrtvideo.cpp b/src/video/winrt/SDL_winrtvideo.cpp index 11041a715..4621d8180 100644 --- a/src/video/winrt/SDL_winrtvideo.cpp +++ b/src/video/winrt/SDL_winrtvideo.cpp @@ -359,6 +359,13 @@ WINRT_VideoQuit(_THIS) WINRT_QuitMouse(_this); } +static const Uint32 WINRT_DetectableFlags = + SDL_WINDOW_MAXIMIZED | + SDL_WINDOW_FULLSCREEN_DESKTOP | + SDL_WINDOW_SHOWN | + SDL_WINDOW_HIDDEN | + SDL_WINDOW_MOUSE_FOCUS; + extern "C" Uint32 WINRT_DetectWindowFlags(SDL_Window * window) { @@ -430,6 +437,7 @@ WINRT_DetectWindowFlags(SDL_Window * window) void WINRT_UpdateWindowFlags(SDL_Window * window, Uint32 mask) { + mask &= WINRT_DetectableFlags; if (window) { Uint32 apply = WINRT_DetectWindowFlags(window); if ((apply & mask) & SDL_WINDOW_FULLSCREEN) {