1
0
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:
Dean Herbert 2020-12-03 12:15:51 +09:00 committed by GitHub
commit a5bb194cb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}
}