From 256a579de02228bb3e243c6c6b350c4907eabb63 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 26 Mar 2019 13:17:00 +0900 Subject: [PATCH] Allow player to not pause on focus loss --- osu.Game/Screens/Play/Player.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 7b1cdd21a6..f2fd7e765f 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -47,6 +47,8 @@ public class Player : ScreenWithBeatmapBackground public bool AllowLeadIn { get; set; } = true; public bool AllowResults { get; set; } = true; + public bool PauseOnFocusLost { get; set; } = true; + private Bindable mouseWheelDisabled; private readonly Bindable storyboardReplacesBackground = new Bindable(); @@ -372,7 +374,7 @@ protected override void Update() base.Update(); // eagerly pause when we lose window focus (if we are locally playing). - if (!Game.IsActive.Value) + if (PauseOnFocusLost && !Game.IsActive.Value) Pause(); }