mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 14:37:30 +08:00
migrate clearance of conflicting ToggleFPSDisplay keybind
This commit is contained in:
parent
379794c462
commit
035e5a9613
@ -93,8 +93,9 @@ namespace osu.Game.Database
|
||||
/// 40 2023-12-21 Add ScoreInfo.Version to keep track of which build scores were set on.
|
||||
/// 41 2024-04-17 Add ScoreInfo.TotalScoreWithoutMods for future mod multiplier rebalances.
|
||||
/// 42 2024-08-07 Update mania key bindings to reflect changes to ManiaAction
|
||||
/// 43 2024-10-14 Reset keybind for toggling FPS display to avoid conflict with "convert to stream" in the editor, if not already changed by user.
|
||||
/// </summary>
|
||||
private const int schema_version = 42;
|
||||
private const int schema_version = 43;
|
||||
|
||||
/// <summary>
|
||||
/// Lock object which is held during <see cref="BlockAllOperations"/> sections, blocking realm retrieval during blocking periods.
|
||||
@ -1192,6 +1193,21 @@ namespace osu.Game.Database
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 43:
|
||||
{
|
||||
// Clear default bindings for "Toggle FPS Display",
|
||||
// as it conflicts with "Convert to Stream" in the editor.
|
||||
// Only apply change if set to the conflicting bind
|
||||
// i.e. has been manually rebound by the user.
|
||||
var keyBindings = migration.NewRealm.All<RealmKeyBinding>();
|
||||
|
||||
var toggleFpsBind = keyBindings.FirstOrDefault(bind => bind.ActionInt == (int)GlobalAction.ToggleFPSDisplay);
|
||||
if (toggleFpsBind != null && toggleFpsBind.KeyCombination.Keys.SequenceEqual(new[] { InputKey.Control, InputKey.Shift, InputKey.F }))
|
||||
migration.NewRealm.Remove(toggleFpsBind);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Logger.Log($"Migration completed in {stopwatch.ElapsedMilliseconds}ms");
|
||||
|
Loading…
Reference in New Issue
Block a user