mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
[input] Ensure button id is never 0
IN_ButtonAction treats id 0 as not pressed in its internal processing, and the previous input implementation treated 0 as "no key", so this is both the simplest and most correct fix. Fixes mouse left button not working every second time the game is run (due to keyboard and mouse bindings swapping places in the config file (separate issue, if it really is one)).
This commit is contained in:
parent
68de8615d6
commit
8d58dee4b1
1 changed files with 2 additions and 0 deletions
|
@ -649,6 +649,8 @@ IMT_ProcessButton (int button, int state)
|
||||||
while (imt) {
|
while (imt) {
|
||||||
in_buttonbinding_t *b = imt->button_bindings.a[button];
|
in_buttonbinding_t *b = imt->button_bindings.a[button];
|
||||||
if (b) {
|
if (b) {
|
||||||
|
// ensure IN_ButtonAction never sees button id 0
|
||||||
|
button += 1;
|
||||||
switch (b->type) {
|
switch (b->type) {
|
||||||
case inb_button:
|
case inb_button:
|
||||||
IN_ButtonAction (b->button, button, state);
|
IN_ButtonAction (b->button, button, state);
|
||||||
|
|
Loading…
Reference in a new issue