mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Add nullref safety to FrameStablePlayback boolean (#5834)
Add nullref safety to FrameStablePlayback boolean
This commit is contained in:
commit
b41bed8ba0
@ -62,13 +62,20 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
public override GameplayClock FrameStableClock => frameStabilityContainer.GameplayClock;
|
||||
|
||||
private bool frameStablePlayback = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable frame-stable playback.
|
||||
/// </summary>
|
||||
internal bool FrameStablePlayback
|
||||
{
|
||||
get => frameStabilityContainer.FrameStablePlayback;
|
||||
set => frameStabilityContainer.FrameStablePlayback = value;
|
||||
get => frameStablePlayback;
|
||||
set
|
||||
{
|
||||
frameStablePlayback = false;
|
||||
if (frameStabilityContainer != null)
|
||||
frameStabilityContainer.FrameStablePlayback = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -156,6 +163,7 @@ namespace osu.Game.Rulesets.UI
|
||||
{
|
||||
frameStabilityContainer = new FrameStabilityContainer(GameplayStartTime)
|
||||
{
|
||||
FrameStablePlayback = FrameStablePlayback,
|
||||
Child = KeyBindingInputManager
|
||||
.WithChild(CreatePlayfieldAdjustmentContainer()
|
||||
.WithChild(Playfield)
|
||||
|
Loading…
Reference in New Issue
Block a user