Change name and add xmldoc

This commit is contained in:
Susko3 2022-02-03 13:55:04 +01:00
parent 40953751b5
commit 84171962e5
2 changed files with 7 additions and 3 deletions

View File

@ -27,7 +27,7 @@ namespace osu.Android
{ {
gameActivity.RunOnUiThread(() => gameActivity.RunOnUiThread(() =>
{ {
gameActivity.RequestedOrientation = userPlaying.NewValue ? ScreenOrientation.Locked : gameActivity.ScreenOrientation; gameActivity.RequestedOrientation = userPlaying.NewValue ? ScreenOrientation.Locked : gameActivity.DefaultOrientation;
}); });
} }
} }

View File

@ -44,7 +44,11 @@ namespace osu.Android
{ {
private static readonly string[] osu_url_schemes = { "osu", "osump" }; private static readonly string[] osu_url_schemes = { "osu", "osump" };
public ScreenOrientation ScreenOrientation = ScreenOrientation.Unspecified; /// <summary>
/// The default screen orientation.
/// </summary>
/// <remarks>Adjusted on startup to match expected UX for the current device type (phone/tablet).</remarks>
public ScreenOrientation DefaultOrientation = ScreenOrientation.Unspecified;
private OsuGameAndroid game; private OsuGameAndroid game;
@ -72,7 +76,7 @@ namespace osu.Android
float smallestWidthDp = Math.Min(displaySize.X, displaySize.Y) / Resources.DisplayMetrics.Density; float smallestWidthDp = Math.Min(displaySize.X, displaySize.Y) / Resources.DisplayMetrics.Density;
bool isTablet = smallestWidthDp >= 600f; bool isTablet = smallestWidthDp >= 600f;
RequestedOrientation = ScreenOrientation = isTablet ? ScreenOrientation.FullUser : ScreenOrientation.SensorLandscape; RequestedOrientation = DefaultOrientation = isTablet ? ScreenOrientation.FullUser : ScreenOrientation.SensorLandscape;
} }
protected override void OnNewIntent(Intent intent) => handleIntent(intent); protected override void OnNewIntent(Intent intent) => handleIntent(intent);