diff --git a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs index 9cf5c42319..320ddae460 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/MouseSettings.cs @@ -14,9 +14,24 @@ namespace osu.Game.Overlays.Settings.Sections.Input { protected override string Header => "Mouse"; + private readonly BindableBool rawInputToggle = new BindableBool(); + private Bindable activeInputHandlers; + [BackgroundDependencyLoader] private void load(OsuConfigManager osuConfig, FrameworkConfigManager config) { + activeInputHandlers = config.GetBindable(FrameworkSetting.ActiveInputHandlers); + rawInputToggle.Value = activeInputHandlers.Value.Contains("Raw"); + rawInputToggle.ValueChanged += enabled => + { + const string raw_mouse_handler = @"OpenTKRawMouseHandler"; + const string standard_mouse_handler = @"OpenTKMouseHandler"; + + activeInputHandlers.Value = enabled ? + activeInputHandlers.Value.Replace(standard_mouse_handler, raw_mouse_handler) : + activeInputHandlers.Value.Replace(raw_mouse_handler, standard_mouse_handler); + }; + Children = new Drawable[] { new SettingsEnumDropdown @@ -34,6 +49,16 @@ namespace osu.Game.Overlays.Settings.Sections.Input LabelText = "Disable mouse buttons during gameplay", Bindable = osuConfig.GetBindable(OsuSetting.MouseDisableButtons) }, + new SettingsCheckbox + { + LabelText = "Raw Input", + Bindable = rawInputToggle + }, + new SettingsSlider + { + LabelText = "Cursor Sensitivity", + Bindable = config.GetBindable(FrameworkSetting.CursorSensitivity) + } }; } @@ -42,4 +67,4 @@ namespace osu.Game.Overlays.Settings.Sections.Input public override string TooltipText => Current.Value.ToString(@"0.##x"); } } -} +} \ No newline at end of file