From 1895b16d6791a552cf3bab66ca52238fa0023ca1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Dec 2017 19:34:20 +0900 Subject: [PATCH 1/4] Correctly make fullscreen overlays block keyboard input from drawables behind them - [ ] Depends on #1711 to get correct global binding handling. --- osu.Game/Overlays/Mods/ModSelectOverlay.cs | 2 ++ osu.Game/Overlays/WaveOverlayContainer.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/osu.Game/Overlays/Mods/ModSelectOverlay.cs b/osu.Game/Overlays/Mods/ModSelectOverlay.cs index e3be23ebc6..9639907914 100644 --- a/osu.Game/Overlays/Mods/ModSelectOverlay.cs +++ b/osu.Game/Overlays/Mods/ModSelectOverlay.cs @@ -31,6 +31,8 @@ namespace osu.Game.Overlays.Mods protected readonly OsuSpriteText MultiplierLabel; private readonly FillFlowContainer footerContainer; + protected override bool BlockPassThroughKeyboard => false; + protected readonly FillFlowContainer ModSectionsContainer; public readonly Bindable> SelectedMods = new Bindable>(); diff --git a/osu.Game/Overlays/WaveOverlayContainer.cs b/osu.Game/Overlays/WaveOverlayContainer.cs index 50150b6660..3f9703a523 100644 --- a/osu.Game/Overlays/WaveOverlayContainer.cs +++ b/osu.Game/Overlays/WaveOverlayContainer.cs @@ -28,6 +28,8 @@ namespace osu.Game.Overlays private readonly Container contentContainer; + protected override bool BlockPassThroughKeyboard => true; + protected override Container Content => contentContainer; protected Color4 FirstWaveColour From 87e790080b25a371c6251a9ea43f5d96d890127c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Dec 2017 22:22:28 +0900 Subject: [PATCH 2/4] Remove manual audio thread synchronisation logic No longer required as calls are blocking. --- osu.Game/Overlays/Music/PlaylistOverlay.cs | 6 ------ osu.Game/Screens/Play/Player.cs | 5 ----- 2 files changed, 11 deletions(-) diff --git a/osu.Game/Overlays/Music/PlaylistOverlay.cs b/osu.Game/Overlays/Music/PlaylistOverlay.cs index 23bec53014..d913895159 100644 --- a/osu.Game/Overlays/Music/PlaylistOverlay.cs +++ b/osu.Game/Overlays/Music/PlaylistOverlay.cs @@ -13,7 +13,6 @@ using osu.Game.Beatmaps; using osu.Game.Graphics; using OpenTK; using OpenTK.Graphics; -using System.Threading; namespace osu.Game.Overlays.Music { @@ -153,11 +152,6 @@ namespace osu.Game.Overlays.Music var track = beatmapBacking.Value.Track; track.Restart(); - - // this is temporary until we have blocking (async.Wait()) audio component methods. - // then we can call RestartAsync().Wait() or the blocking version above. - while (!track.IsRunning) - Thread.Sleep(1); } } diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index e9992f2df7..c7111e57f2 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -327,11 +327,6 @@ namespace osu.Game.Screens.Play { adjustableSourceClock.Reset(); - // this is temporary until we have blocking (async.Wait()) audio component methods. - // then we can call ResetAsync().Wait() or the blocking version above. - while (adjustableSourceClock.IsRunning) - Thread.Sleep(1); - Schedule(() => { decoupledClock.ChangeSource(adjustableSourceClock); From 0121692919333f959fb9bbf3d4290cfdea20e978 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Dec 2017 23:14:42 +0900 Subject: [PATCH 3/4] Ignore bugged inspectcode inspection --- .../OsuDifficulty/Preprocessing/OsuDifficultyHitObject.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game.Rulesets.Osu/OsuDifficulty/Preprocessing/OsuDifficultyHitObject.cs b/osu.Game.Rulesets.Osu/OsuDifficulty/Preprocessing/OsuDifficultyHitObject.cs index 972677a6f1..89821a10fb 100644 --- a/osu.Game.Rulesets.Osu/OsuDifficulty/Preprocessing/OsuDifficultyHitObject.cs +++ b/osu.Game.Rulesets.Osu/OsuDifficulty/Preprocessing/OsuDifficultyHitObject.cs @@ -93,6 +93,7 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty.Preprocessing float approxFollowCircleRadius = (float)(slider.Radius * 3); var computeVertex = new Action(t => { + // ReSharper disable once PossibleInvalidOperationException (bugged in current r# version) var diff = slider.PositionAt(t) - slider.LazyEndPosition.Value; float dist = diff.Length; From 13fee5402a54d160160f98603a69d7e94a4fe89d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Dec 2017 23:20:11 +0900 Subject: [PATCH 4/4] Remove unnecessary using visual studio doesn't save --- osu.Game/Screens/Play/Player.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index c7111e57f2..340fc39d52 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -17,7 +17,6 @@ using osu.Game.Rulesets.UI; using osu.Game.Screens.Backgrounds; using System; using System.Linq; -using System.Threading; using System.Threading.Tasks; using osu.Framework.Threading; using osu.Game.Rulesets.Mods;