1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00

Merge pull request #11961 from frenzibyte/fix-sensitivity-globally-disabled

This commit is contained in:
Dean Herbert 2021-03-04 23:38:36 +09:00 committed by GitHub
commit a0ccfa8129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View File

@ -880,13 +880,8 @@ namespace osu.Game
switch (action)
{
case GlobalAction.ResetInputSettings:
var sensitivity = frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity);
sensitivity.Disabled = false;
sensitivity.Value = 1;
sensitivity.Disabled = true;
frameworkConfig.Set(FrameworkSetting.IgnoredInputHandlers, string.Empty);
frameworkConfig.GetBindable<string>(FrameworkSetting.IgnoredInputHandlers).SetDefault();
frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity).SetDefault();
frameworkConfig.GetBindable<ConfineMouseMode>(FrameworkSetting.ConfineMouseMode).SetDefault();
return true;

View File

@ -76,7 +76,15 @@ namespace osu.Game.Overlays.Settings.Sections.Input
{
base.LoadComplete();
configSensitivity.BindValueChanged(val => localSensitivity.Value = val.NewValue, true);
configSensitivity.BindValueChanged(val =>
{
var disabled = localSensitivity.Disabled;
localSensitivity.Disabled = false;
localSensitivity.Value = val.NewValue;
localSensitivity.Disabled = disabled;
}, true);
localSensitivity.BindValueChanged(val => configSensitivity.Value = val.NewValue);
windowMode.BindValueChanged(mode =>