mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 04:52:53 +08:00
Make suspend stored state nullable to ensure we don't break it
This commit is contained in:
parent
fa693bb8a8
commit
b58415fe19
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user