mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Merge pull request #11060 from FamousPig/fix-raw-input
Fix MouseHandler not being ignored when Raw Input is enabled
This commit is contained in:
commit
a5bb194cb8
@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
private readonly BindableBool rawInputToggle = new BindableBool();
|
||||
private Bindable<double> sensitivityBindable = new BindableDouble();
|
||||
private Bindable<string> ignoredInputHandler;
|
||||
private Bindable<string> ignoredInputHandlers;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager osuConfig, FrameworkConfigManager config)
|
||||
@ -75,20 +75,20 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
// this is temporary until we support per-handler settings.
|
||||
const string raw_mouse_handler = @"OsuTKRawMouseHandler";
|
||||
const string standard_mouse_handler = @"OsuTKMouseHandler";
|
||||
const string standard_mouse_handlers = @"OsuTKMouseHandler MouseHandler";
|
||||
|
||||
ignoredInputHandler.Value = enabled.NewValue ? standard_mouse_handler : raw_mouse_handler;
|
||||
ignoredInputHandlers.Value = enabled.NewValue ? standard_mouse_handlers : raw_mouse_handler;
|
||||
};
|
||||
|
||||
ignoredInputHandler = config.GetBindable<string>(FrameworkSetting.IgnoredInputHandlers);
|
||||
ignoredInputHandler.ValueChanged += handler =>
|
||||
ignoredInputHandlers = config.GetBindable<string>(FrameworkSetting.IgnoredInputHandlers);
|
||||
ignoredInputHandlers.ValueChanged += handler =>
|
||||
{
|
||||
bool raw = !handler.NewValue.Contains("Raw");
|
||||
rawInputToggle.Value = raw;
|
||||
sensitivityBindable.Disabled = !raw;
|
||||
};
|
||||
|
||||
ignoredInputHandler.TriggerChange();
|
||||
ignoredInputHandlers.TriggerChange();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user