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.
This commit is contained in:
David Ludwig 2015-11-26 02:13:15 -05:00
parent f520994455
commit 36090f576f
1 changed files with 8 additions and 0 deletions

View File

@ -359,6 +359,13 @@ WINRT_VideoQuit(_THIS)
WINRT_QuitMouse(_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 extern "C" Uint32
WINRT_DetectWindowFlags(SDL_Window * window) WINRT_DetectWindowFlags(SDL_Window * window)
{ {
@ -430,6 +437,7 @@ WINRT_DetectWindowFlags(SDL_Window * window)
void void
WINRT_UpdateWindowFlags(SDL_Window * window, Uint32 mask) WINRT_UpdateWindowFlags(SDL_Window * window, Uint32 mask)
{ {
mask &= WINRT_DetectableFlags;
if (window) { if (window) {
Uint32 apply = WINRT_DetectWindowFlags(window); Uint32 apply = WINRT_DetectWindowFlags(window);
if ((apply & mask) & SDL_WINDOW_FULLSCREEN) { if ((apply & mask) & SDL_WINDOW_FULLSCREEN) {