1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 09:47:24 +08:00

Fix android screen orientation locking in portrait mode during gameplay when exiting/re-entering app

This commit is contained in:
Joseph Madamba 2024-10-30 17:43:39 -07:00
parent 50be7fb077
commit 4a26989084
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76

View File

@ -5,7 +5,6 @@ using Android.Content.PM;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game;
using osu.Game.Screens.Play;
namespace osu.Android
@ -28,7 +27,7 @@ namespace osu.Android
{
gameActivity.RunOnUiThread(() =>
{
gameActivity.RequestedOrientation = userPlaying.NewValue != LocalUserPlayingState.NotPlaying ? ScreenOrientation.Locked : gameActivity.DefaultOrientation;
gameActivity.RequestedOrientation = userPlaying.NewValue == LocalUserPlayingState.Playing ? ScreenOrientation.Locked : gameActivity.DefaultOrientation;
});
}
}