mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Fix key binding row fire-and-forgetting writes
Intends to fix test failures as seen in https://github.com/ppy/osu/actions/runs/6692350567/job/18181352642#step:5:129 This is what happens if you carelessly fire and forget. The working theory (that I'm not sure I have the tools to conclusively confirm) is that the async write from the key binding changing could fire _after_ the section is reset. I briefly considered having the test wait for the change, but given that the entirety of the surrounding flow is using sync operations, this just looks like a bug to me. And there's no real sane way to inject async into that flow due to dependence on `OsuButton.Action`.
This commit is contained in:
parent
bc2acc3e93
commit
9f5a280bc2
@ -498,7 +498,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
if (existingBinding == null)
|
||||
{
|
||||
realm.WriteAsync(r => r.Find<RealmKeyBinding>(keyBinding.ID)!.KeyCombinationString = keyBinding.KeyCombination.ToString());
|
||||
realm.Write(r => r.Find<RealmKeyBinding>(keyBinding.ID)!.KeyCombinationString = keyBinding.KeyCombination.ToString());
|
||||
BindingUpdated?.Invoke(this, new KeyBindingUpdatedEventArgs(bindingConflictResolved: false, advanceToNextBinding));
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user