mirror of https://github.com/ppy/osu
Fix some discrepancies when changing settings
This commit is contained in:
parent
72cbf76a48
commit
1b0e96f411
|
@ -264,8 +264,13 @@ private bool globalHotkeyPressed(InputState state, KeyDownEventArgs args)
|
|||
case Key.R:
|
||||
if (state.Keyboard.AltPressed)
|
||||
{
|
||||
var sensitivity = frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity);
|
||||
|
||||
sensitivity.Disabled = false;
|
||||
sensitivity.Value = 1;
|
||||
sensitivity.Disabled = true;
|
||||
|
||||
frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty);
|
||||
frameworkConfig.Set(FrameworkSetting.CursorSensitivity, 1.0);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -59,12 +59,16 @@ private void load(OsuConfigManager osuConfig, FrameworkConfigManager config)
|
|||
activeInputHandlers.Value = enabled ?
|
||||
activeInputHandlers.Value.Replace(standard_mouse_handler, raw_mouse_handler) :
|
||||
activeInputHandlers.Value.Replace(raw_mouse_handler, standard_mouse_handler);
|
||||
|
||||
sensitivity.Bindable.Disabled = !enabled;
|
||||
};
|
||||
|
||||
activeInputHandlers = config.GetBindable<string>(FrameworkSetting.ActiveInputHandlers);
|
||||
activeInputHandlers.ValueChanged += handlers => rawInputToggle.Value = handlers.Contains("Raw");
|
||||
activeInputHandlers.ValueChanged += handlers =>
|
||||
{
|
||||
bool raw = handlers.Contains("Raw");
|
||||
rawInputToggle.Value = raw;
|
||||
sensitivity.Bindable.Disabled = !raw;
|
||||
};
|
||||
|
||||
activeInputHandlers.TriggerChange();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue