mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Make suspend stored state nullable to ensure we don't break it
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
@ -94,7 +95,7 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
private OsuScreenDependencies screenDependencies;
|
private OsuScreenDependencies screenDependencies;
|
||||||
|
|
||||||
private bool trackAdjustmentStateAtSuspend;
|
private bool? trackAdjustmentStateAtSuspend;
|
||||||
|
|
||||||
internal void CreateLeasedDependencies(IReadOnlyDependencyContainer dependencies) => createDependencies(dependencies);
|
internal void CreateLeasedDependencies(IReadOnlyDependencyContainer dependencies) => createDependencies(dependencies);
|
||||||
|
|
||||||
@ -178,7 +179,9 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
applyArrivingDefaults(true);
|
applyArrivingDefaults(true);
|
||||||
|
|
||||||
musicController.AllowTrackAdjustments = trackAdjustmentStateAtSuspend;
|
Debug.Assert(trackAdjustmentStateAtSuspend != null);
|
||||||
|
|
||||||
|
musicController.AllowTrackAdjustments = trackAdjustmentStateAtSuspend.Value;
|
||||||
|
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user