mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Fix song select touch handler causing crashes when song select is suspended
This commit is contained in:
parent
ef555ed0cf
commit
c588f434e5
@ -32,14 +32,18 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
ruleset.BindValueChanged(_ => updateState());
|
ruleset.BindValueChanged(_ => Scheduler.AddOnce(updateState));
|
||||||
mods.BindValueChanged(_ => updateState());
|
mods.BindValueChanged(_ => Scheduler.AddOnce(updateState));
|
||||||
touchActive.BindValueChanged(_ => updateState());
|
mods.BindDisabledChanged(_ => Scheduler.AddOnce(updateState));
|
||||||
|
touchActive.BindValueChanged(_ => Scheduler.AddOnce(updateState));
|
||||||
updateState();
|
updateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
|
if (mods.Disabled)
|
||||||
|
return;
|
||||||
|
|
||||||
var touchDeviceMod = ruleset.Value.CreateInstance().GetTouchDeviceMod();
|
var touchDeviceMod = ruleset.Value.CreateInstance().GetTouchDeviceMod();
|
||||||
|
|
||||||
if (touchDeviceMod == null)
|
if (touchDeviceMod == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user