From fee661859a4ea70a54244cc3fe94b6d03b656ce6 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Sun, 29 Dec 2024 23:54:04 -0500 Subject: [PATCH] Keep game in portrait mode when restarting --- osu.Game/Screens/Play/PlayerLoader.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 837974a8f23d..b258de0e9ee1 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -54,6 +54,9 @@ public partial class PlayerLoader : ScreenWithBeatmapBackground public override bool? AllowGlobalTrackControl => false; + // this makes the game stay in portrait mode when restarting gameplay rather than switching back to landscape. + public override bool RequiresPortraitOrientation => CurrentPlayer?.RequiresPortraitOrientation == true; + public override float BackgroundParallaxAmount => quickRestart ? 0 : 1; // Here because IsHovered will not update unless we do so.