mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Apply review suggestions.
This commit is contained in:
@ -17,14 +17,14 @@ namespace osu.Android
|
|||||||
private void load(OsuGame game)
|
private void load(OsuGame game)
|
||||||
{
|
{
|
||||||
localUserPlaying = game.LocalUserPlaying.GetBoundCopy();
|
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.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)]
|
[Activity(Theme = "@android:style/Theme.NoTitleBar", MainLauncher = true, ScreenOrientation = ScreenOrientation.FullUser, SupportsPictureInPicture = false, ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize, HardwareAccelerated = false)]
|
||||||
public class OsuGameActivity : AndroidGameActivity
|
public class OsuGameActivity : AndroidGameActivity
|
||||||
{
|
{
|
||||||
internal static Activity Activity;
|
internal static Activity Activity { get; private set; }
|
||||||
|
|
||||||
protected override Framework.Game CreateGame() => new OsuGameAndroid();
|
protected override Framework.Game CreateGame() => new OsuGameAndroid();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user