mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Fix possible null reference due to bindable change before variable is initialized
This commit is contained in:
parent
56699df0cf
commit
2469608c10
@ -33,9 +33,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
configSensitivity.BindValueChanged(val => sensitivityBindable.Value = val.NewValue);
|
||||
sensitivityBindable.BindValueChanged(val => configSensitivity.Value = val.NewValue);
|
||||
|
||||
windowMode = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
|
||||
windowMode.BindValueChanged(mode => confineMouseModeSetting.Alpha = mode.NewValue == WindowMode.Fullscreen ? 0 : 1);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsCheckbox
|
||||
@ -70,6 +67,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
},
|
||||
};
|
||||
|
||||
windowMode = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
|
||||
windowMode.BindValueChanged(mode => confineMouseModeSetting.Alpha = mode.NewValue == WindowMode.Fullscreen ? 0 : 1);
|
||||
|
||||
if (RuntimeInfo.OS != RuntimeInfo.Platform.Windows)
|
||||
{
|
||||
rawInputToggle.Disabled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user