[input] Actually return the button in IN_FindButton

Returning the wrapper object makes for some weird behaviour.
This commit is contained in:
Bill Currie 2021-11-16 16:33:53 +09:00
parent 7739972f19
commit 73ab33ba97

View file

@ -189,7 +189,11 @@ IN_RegisterButton (in_button_t *button)
in_button_t *
IN_FindButton (const char *name)
{
return Hash_Find (button_tab, name);
regbutton_t *regbutton = Hash_Find (button_tab, name);
if (regbutton) {
return regbutton->button;
}
return 0;
}
static void __attribute__((constructor))