1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Fix temporary auto mod (ctrl+enter at song select) not reverting in all scenarios

This commit is contained in:
Dean Herbert 2023-07-28 14:42:43 +09:00
parent 269d4d1cd6
commit f15394fb6d

View File

@ -146,12 +146,24 @@ namespace osu.Game.Screens.Select
public override void OnResuming(ScreenTransitionEvent e)
{
base.OnResuming(e);
revertMods();
}
if (playerLoader != null)
{
Mods.Value = modsAtGameplayStart;
playerLoader = null;
}
public override bool OnExiting(ScreenExitEvent e)
{
if (base.OnExiting(e))
return true;
revertMods();
return false;
}
private void revertMods()
{
if (playerLoader == null) return;
Mods.Value = modsAtGameplayStart;
playerLoader = null;
}
}
}