mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Apply review suggestions.
This commit is contained in:
parent
e823575751
commit
b60dfc55b6
@ -17,14 +17,14 @@ namespace osu.Android
|
||||
private void load(OsuGame game)
|
||||
{
|
||||
localUserPlaying = game.LocalUserPlaying.GetBoundCopy();
|
||||
localUserPlaying.BindValueChanged(_ => updateLock());
|
||||
localUserPlaying.BindValueChanged(userPlaying => updateLock(userPlaying));
|
||||
}
|
||||
|
||||
private void updateLock()
|
||||
private void updateLock(ValueChangedEvent<bool> userPlaying)
|
||||
{
|
||||
OsuGameActivity.Activity.RunOnUiThread(() =>
|
||||
{
|
||||
OsuGameActivity.Activity.RequestedOrientation = localUserPlaying.Value ? ScreenOrientation.Locked : ScreenOrientation.FullUser;
|
||||
OsuGameActivity.Activity.RequestedOrientation = userPlaying.NewValue ? ScreenOrientation.Locked : ScreenOrientation.FullUser;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Android
|
||||
[Activity(Theme = "@android:style/Theme.NoTitleBar", MainLauncher = true, ScreenOrientation = ScreenOrientation.FullUser, SupportsPictureInPicture = false, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize, HardwareAccelerated = false)]
|
||||
public class OsuGameActivity : AndroidGameActivity
|
||||
{
|
||||
internal static Activity Activity;
|
||||
internal static Activity Activity { get; private set; }
|
||||
|
||||
protected override Framework.Game CreateGame() => new OsuGameAndroid();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user