|
@@ -501,9 +501,15 @@ void SDL_OnApplicationDidChangeStatusBarOrientation(void)
|
|
|
* fullscreen desktop keeps the window dimensions in the
|
|
|
* correct orientation. */
|
|
|
if (isLandscape != (mode->w > mode->h)) {
|
|
|
- int height = mode->w;
|
|
|
- mode->w = mode->h;
|
|
|
- mode->h = height;
|
|
|
+ SDL_DisplayMode new_mode;
|
|
|
+ SDL_copyp(&new_mode, mode);
|
|
|
+ new_mode.w = mode->h;
|
|
|
+ new_mode.h = mode->w;
|
|
|
+
|
|
|
+ // Make sure we don't free the current display mode data
|
|
|
+ mode->internal = NULL;
|
|
|
+
|
|
|
+ SDL_SetDesktopDisplayMode(display, &new_mode);
|
|
|
}
|
|
|
|
|
|
// Same deal with the fullscreen modes
|