diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 14:06:37 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-29 14:06:37 +0300 |
commit | c49aa1209e9427bcfe45d77aa2dc301f1a20e831 (patch) | |
tree | 797551b63b21206a043e6d46eb37ac39e94d14fc /src | |
parent | c13bdde1bc79f95a42cd99d92b140a7b19c71c28 (diff) |
Fixed: Missing bindings
Don't use built-in default bindings to update buttons or menu items.
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/keys.c | 1 | ||||
-rw-r--r-- | src/ui/labelwidget.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/ui/keys.c b/src/ui/keys.c index ecf65995..456ca928 100644 --- a/src/ui/keys.c +++ b/src/ui/keys.c | |||
@@ -426,7 +426,6 @@ iBool processEvent_Keys(const SDL_Event *ev) { | |||
426 | iKeys *d = &keys_; | 426 | iKeys *d = &keys_; |
427 | if (ev->type == SDL_KEYDOWN || ev->type == SDL_KEYUP) { | 427 | if (ev->type == SDL_KEYDOWN || ev->type == SDL_KEYUP) { |
428 | const iBinding *bind = find_Keys_(d, ev->key.keysym.sym, keyMods_Sym(ev->key.keysym.mod)); | 428 | const iBinding *bind = find_Keys_(d, ev->key.keysym.sym, keyMods_Sym(ev->key.keysym.mod)); |
429 | printf("[Keys] bind: %p\n", bind); fflush(stdout); | ||
430 | if (bind) { | 429 | if (bind) { |
431 | if (ev->type == SDL_KEYUP) { | 430 | if (ev->type == SDL_KEYUP) { |
432 | if (bind->flags & argRelease_BindFlag) { | 431 | if (bind->flags & argRelease_BindFlag) { |
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index d16ef69d..43f88277 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -73,7 +73,7 @@ static void trigger_LabelWidget_(const iLabelWidget *d) { | |||
73 | static void updateKey_LabelWidget_(iLabelWidget *d) { | 73 | static void updateKey_LabelWidget_(iLabelWidget *d) { |
74 | if (!isEmpty_String(&d->command)) { | 74 | if (!isEmpty_String(&d->command)) { |
75 | const iBinding *bind = findCommand_Keys(cstr_String(&d->command)); | 75 | const iBinding *bind = findCommand_Keys(cstr_String(&d->command)); |
76 | if (bind) { | 76 | if (bind && bind->id < builtIn_BindingId) { |
77 | d->key = bind->key; | 77 | d->key = bind->key; |
78 | d->kmods = bind->mods; | 78 | d->kmods = bind->mods; |
79 | } | 79 | } |