1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
This commit is contained in:
y5nw 2025-06-01 11:21:58 +02:00
parent 97c34ecd22
commit 016e5bb46c

View file

@ -335,7 +335,7 @@ bool TouchControls::mayAddButton(touch_gui_button_id id)
assert(ButtonLayout::isButtonValid(id)); assert(ButtonLayout::isButtonValid(id));
assert(ButtonLayout::isButtonAllowed(id)); assert(ButtonLayout::isButtonAllowed(id));
// The overflow button doesn't need a keycode to be valid. // The overflow button doesn't need a keycode to be valid.
return id == overflow_id || id_to_action(id) >= KeyType::INTERNAL_ENUM_COUNT; return id == overflow_id || id_to_action(id) < KeyType::INTERNAL_ENUM_COUNT;
} }
void TouchControls::addButton(std::vector<button_info> &buttons, touch_gui_button_id id, void TouchControls::addButton(std::vector<button_info> &buttons, touch_gui_button_id id,