src/core/winrt/SDL_winrtapp_direct3d.cpp
changeset 9256 9c45fc8605d9
parent 9240 dc4ad21d8596
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9255:c2ef0d8d6da0 9256:9c45fc8605d9
   123 }
   123 }
   124 
   124 
   125 static void WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const char *oldValue, const char *newValue)
   125 static void WINRT_SetDisplayOrientationsPreference(void *userdata, const char *name, const char *oldValue, const char *newValue)
   126 {
   126 {
   127     SDL_assert(SDL_strcmp(name, SDL_HINT_ORIENTATIONS) == 0);
   127     SDL_assert(SDL_strcmp(name, SDL_HINT_ORIENTATIONS) == 0);
       
   128 
       
   129     /* HACK: prevent SDL from altering an app's .appxmanifest-set orientation
       
   130      * from being changed on startup, by detecting when SDL_HINT_ORIENTATIONS
       
   131      * is getting registered.
       
   132      *
       
   133      * TODO, WinRT: consider reading in an app's .appxmanifest file, and apply its orientation when 'newValue == NULL'.
       
   134      */
       
   135     if ((oldValue == NULL) && (newValue == NULL)) {
       
   136         return;
       
   137     }
   128 
   138 
   129     // Start with no orientation flags, then add each in as they're parsed
   139     // Start with no orientation flags, then add each in as they're parsed
   130     // from newValue.
   140     // from newValue.
   131     unsigned int orientationFlags = 0;
   141     unsigned int orientationFlags = 0;
   132     if (newValue) {
   142     if (newValue) {