WinRT: bug-fix, OpenGLES2 was failing to init, after recent windowing fixes
authorDavid Ludwig
Thu, 26 Nov 2015 02:13:15 -0500
changeset 9926277db103ed10
parent 9925 2be74843315c
child 9927 16d2f1997733
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
     1.1 --- a/src/video/winrt/SDL_winrtvideo.cpp	Thu Nov 26 01:36:36 2015 -0500
     1.2 +++ b/src/video/winrt/SDL_winrtvideo.cpp	Thu Nov 26 02:13:15 2015 -0500
     1.3 @@ -359,6 +359,13 @@
     1.4      WINRT_QuitMouse(_this);
     1.5  }
     1.6  
     1.7 +static const Uint32 WINRT_DetectableFlags =
     1.8 +    SDL_WINDOW_MAXIMIZED |
     1.9 +    SDL_WINDOW_FULLSCREEN_DESKTOP |
    1.10 +    SDL_WINDOW_SHOWN |
    1.11 +    SDL_WINDOW_HIDDEN |
    1.12 +    SDL_WINDOW_MOUSE_FOCUS;
    1.13 +
    1.14  extern "C" Uint32
    1.15  WINRT_DetectWindowFlags(SDL_Window * window)
    1.16  {
    1.17 @@ -430,6 +437,7 @@
    1.18  void
    1.19  WINRT_UpdateWindowFlags(SDL_Window * window, Uint32 mask)
    1.20  {
    1.21 +    mask &= WINRT_DetectableFlags;
    1.22      if (window) {
    1.23          Uint32 apply = WINRT_DetectWindowFlags(window);
    1.24          if ((apply & mask) & SDL_WINDOW_FULLSCREEN) {