1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 17:17:24 +08:00
Commit Graph

44 Commits

Author SHA1 Message Date
Bartłomiej Dach
828cedea33
Fix bindings being cleared if multiple bindings for same action have the same combination
This actually seems to be the case in catch (dash is bound to shift
twice). This is annoying but harmless, so let's work around it for now
to avoid ruining users' configs.
2023-10-16 22:20:26 +02:00
Bartłomiej Dach
9c6166ec3d
Add migration to remove duplicate bindings 2023-10-16 22:20:26 +02:00
Bartłomiej Dach
639c96e60c
Prevent ruleset input managers from reading duplicate bindings 2023-10-16 21:02:24 +02:00
Bartłomiej Dach
90c44cee54
Implement method to deduplicate keybindings 2023-10-16 20:51:57 +02:00
Bartłomiej Dach
79273b88f6
Add stub of method to deduplicate bindings (and failing test) 2023-10-16 20:48:52 +02:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
e23b10e6a5 Update remaining cases of clashing variable name in realm.Run(realm.. 2022-01-25 13:04:05 +09:00
Dean Herbert
6eb2c28e41 Rename RealmContextFactory to RealmAccess 2022-01-24 20:38:07 +09:00
Dean Herbert
114c9e8c1f Update all usages of CreateContext to use either Run or Write 2022-01-21 17:27:08 +09:00
Dean Herbert
70cc03fe43 Avoid constructor overhead for realm RealmKeyBinding parameterless constructor 2022-01-20 17:29:07 +09:00
Dean Herbert
7318ff3f98 Refactor KeyBindingStore to clean up any excess bindings for individual actions
While this isn't strictly required (outside of rulesets, potentially),
I think it's best that we keep these counts in a sane state.

Right now, it will remove any excess. Arguably, in the case an entry is
found with too many, we should wipe all entries and re-populate the
defaults. Interested in opinions on that before merging. See
https://github.com/ppy/osu/discussions/15925 for an example where wiping
may be the more appropriate behaviour.
2021-12-13 15:26:51 +09:00
Dean Herbert
d94b27a8a2 Switch realm ruleset key bindings to use ruleset's ShortName as key 2021-11-22 18:52:30 +09:00
Dean Herbert
f5842e7587 Shorten variable names 2021-11-08 18:24:37 +09:00
Susko3
c3069ad002 Change to use ReadableKeyCombinationProvider
Changes all usages of `KeyCombination.ReadableString()` to
`ReadableKeyCombinationProvider.GetReadableString()`.

Subscribing to `KeymapChanged` is only required in `KeyButton`.
All other places query `GetReadableString()` every time.
2021-11-08 06:55:26 +01:00
Dean Herbert
6944151486 Apply batch fixing of built-in types using var 2021-10-27 13:04:41 +09:00
Dean Herbert
9fa901f6aa Refine RealmContext implementation API 2021-09-30 23:56:38 +09:00
Dean Herbert
5b13b566b5 Reduce startup overhead during default key binding handling 2021-09-07 15:19:23 +09:00
Dean Herbert
d5a1524eb0 Add missing rulesetID check for global action matching 2021-06-18 17:12:01 +09:00
Dean Herbert
d06e52505a Fix thread safety of KeyBindingStore.GetReadableKeyCombinationsFor 2021-06-18 17:11:39 +09:00
Dean Herbert
a249bb9e69 Merge branch 'master' into realm-key-binding-store 2021-05-25 17:18:33 +09:00
Dean Herbert
253c66034d Remove unused using statement 2021-04-26 17:45:43 +09:00
Dean Herbert
8961203f08 Move guid initialisation to database model itself 2021-04-26 17:06:03 +09:00
Dean Herbert
68f2e7f61a Use realm support for Guid 2021-01-19 18:22:36 +09:00
Dean Herbert
f26c6210f3 Remove unnecessary Take() call and refactor default group logic naming 2021-01-14 16:36:24 +09:00
Dean Herbert
8a08d3f4ef Fix transactions not actually being committed 2021-01-14 16:13:10 +09:00
Dean Herbert
5fa3a22f28 Remove unused RealmBackedStore base class 2021-01-13 18:36:37 +09:00
Dean Herbert
fcb4a53f37 Rename realm persisted properties to avoid casting necessity 2021-01-13 18:36:37 +09:00
Dean Herbert
9086d75542 Update write usages 2021-01-13 18:36:37 +09:00
Dean Herbert
9d744d629f Update existing usages to use the main realm context where applicable 2021-01-13 18:36:37 +09:00
Dean Herbert
78707c3b06 Remove unused event 2021-01-13 18:36:37 +09:00
Dean Herbert
192e58e0c6 Update all read queries to use direct realm subscriptions/queries 2021-01-13 18:36:37 +09:00
Dean Herbert
a6997a6fc6 Move ruleset key binding registration to an explicit method rather than the constructor 2021-01-12 15:21:02 +09:00
Dean Herbert
ff16d2f490 Mark classes nullable 2021-01-12 15:21:02 +09:00
Dean Herbert
536e7229d0 Remove unused EF class and unnecessary interface 2021-01-12 14:45:36 +09:00
Dean Herbert
406e640fa9 Make key binding update method support all kinds of realm object states 2021-01-12 14:45:36 +09:00
Dean Herbert
6fd098ca7c Add full xmldoc to RealmKeyBindingStore 2021-01-11 16:31:36 +09:00
Dean Herbert
56d34432f9 Move public members up 2021-01-11 16:31:36 +09:00
Dean Herbert
a1cb6d8c54 Remove unnecesssary local conversion method 2021-01-11 16:31:36 +09:00
Dean Herbert
8765aaf9e6 Use IKeyBinding for all key binding usages (and add update flow via primary key) 2021-01-11 16:31:35 +09:00
Dean Herbert
a77519c6bd Store KeyBinding action to its own field in realm
Also improve the Query method for action types by using generic field
2021-01-11 15:52:49 +09:00
Dean Herbert
43f417b53a Add and consume IKeyBindingStore interface 2021-01-11 15:52:49 +09:00
Dean Herbert
391259c713 Add missing implementation details to realm keybinding store 2021-01-11 15:52:49 +09:00
Dean Herbert
ee6a26bd6e Initialise new key bindings with a primary key 2021-01-11 15:52:49 +09:00
Dean Herbert
d5ac97ece8 Add realm store / key binding implementations 2021-01-11 15:52:49 +09:00