Simple Directmedia Layer

Send display mode change events when the orientation changes

+9 -3
+9 -3
src/video/uikit/SDL_uikitmodes.m
··· 501 501 * fullscreen desktop keeps the window dimensions in the 502 502 * correct orientation. */ 503 503 if (isLandscape != (mode->w > mode->h)) { 504 - int height = mode->w; 505 - mode->w = mode->h; 506 - mode->h = height; 504 + SDL_DisplayMode new_mode; 505 + SDL_copyp(&new_mode, mode); 506 + new_mode.w = mode->h; 507 + new_mode.h = mode->w; 508 + 509 + // Make sure we don't free the current display mode data 510 + mode->internal = NULL; 511 + 512 + SDL_SetDesktopDisplayMode(display, &new_mode); 507 513 } 508 514 509 515 // Same deal with the fullscreen modes