Update comment to hopefully explain a weird conditional better

This commit is contained in:
Dean Herbert 2021-06-18 17:45:30 +09:00
parent 5c59195e35
commit 36b5414b1d

View File

@ -83,8 +83,9 @@ namespace osu.Game.Input.Bindings
var defaults = DefaultKeyBindings.ToList();
if (ruleset != null && !ruleset.ID.HasValue)
// if the provided ruleset is not stored to the database, we have no way to retrieve custom bindings.
// fallback to defaults instead.
// some tests instantiate a ruleset which is not present in the database.
// in these cases we still want key bindings to work, but matching to database instances would result in none being present,
// so let's populate the defaults directly.
KeyBindings = defaults;
else
{