1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 05:32:56 +08:00

Fix incorrect thread access in recent iOS orientation changes

This commit is contained in:
Salman Alshamrani 2025-02-10 05:55:21 -05:00
parent 3294450dc9
commit 4b8890ef0c

View File

@ -41,7 +41,7 @@ namespace osu.iOS
updateOrientation();
}
private void updateOrientation()
private void updateOrientation() => UIApplication.SharedApplication.InvokeOnMainThread(() =>
{
bool iPad = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad;
var orientation = MobileUtils.GetOrientation(this, (IOsuScreen)ScreenStack.CurrentScreen, iPad);
@ -60,7 +60,7 @@ namespace osu.iOS
appDelegate.Orientations = null;
break;
}
}
});
protected override UpdateManager CreateUpdateManager() => new MobileUpdateNotifier();