1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Disable all tablet handlers to guard against a grim future

This commit is contained in:
Dean Herbert 2023-06-02 08:48:47 +09:00
parent 9f8a13480b
commit c33ddedca0

View File

@ -1145,8 +1145,11 @@ namespace osu.Game
IconColour = Colours.RedDark,
});
var tabletHandler = Host.AvailableInputHandlers.OfType<ITabletHandler>().FirstOrDefault();
if (tabletHandler != null)
// We only have one tablet handler currently.
// The loop here is weakly guarding against a future where more than one is added.
// If this is ever the case, this logic needs adjustment as it should probably only
// disable the relevant tablet handler rather than all.
foreach (var tabletHandler in Host.AvailableInputHandlers.OfType<ITabletHandler>())
tabletHandler.Enabled.Value = false;
});
}