Skip to content

Commit 6ff1a13

Browse files
authored
Merge pull request #31845 from frenzibyte/ios-threading-woes
Fix incorrect thread access in recent iOS orientation changes
2 parents 3294450 + 4b8890e commit 6ff1a13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

osu.iOS/OsuGameIOS.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected override void ScreenChanged(IOsuScreen? current, IOsuScreen? newScreen
4141
updateOrientation();
4242
}
4343

44-
private void updateOrientation()
44+
private void updateOrientation() => UIApplication.SharedApplication.InvokeOnMainThread(() =>
4545
{
4646
bool iPad = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad;
4747
var orientation = MobileUtils.GetOrientation(this, (IOsuScreen)ScreenStack.CurrentScreen, iPad);
@@ -60,7 +60,7 @@ private void updateOrientation()
6060
appDelegate.Orientations = null;
6161
break;
6262
}
63-
}
63+
});
6464

6565
protected override UpdateManager CreateUpdateManager() => new MobileUpdateNotifier();
6666

0 commit comments

Comments
 (0)