mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-16 08:18:13 +00:00
Wait for a display resize event before sending orientation changes
Fixes https://github.com/libsdl-org/SDL/issues/9585
This commit is contained in:
@@ -1063,10 +1063,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeRotationChanged)(
|
||||
break;
|
||||
}
|
||||
|
||||
if (Android_Window) {
|
||||
SDL_VideoDisplay *display = SDL_GetVideoDisplay(SDL_GetPrimaryDisplay());
|
||||
SDL_SendDisplayEvent(display, SDL_EVENT_DISPLAY_ORIENTATION, displayCurrentOrientation, 0);
|
||||
}
|
||||
Android_SetOrientation(displayCurrentOrientation);
|
||||
|
||||
SDL_UnlockMutex(Android_ActivityMutex);
|
||||
}
|
||||
|
Reference in New Issue
Block a user