Wait for a display resize event before sending orientation changes
Fixes https://github.com/libsdl-org/SDL/issues/9585
This commit is contained in:
parent
60deaf5f0f
commit
8704ab8422
3 changed files with 27 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue