Skip to content

Commit

Permalink
use KEY_UNKNOWN
Browse files Browse the repository at this point in the history
Signed-off-by: David Heidelberg <david@ixit.cz>
  • Loading branch information
okias committed Feb 18, 2024
1 parent ae53781 commit 13fb14d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/touchscreengui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static EKEY_CODE id_to_keycode(touch_gui_button_id id)
try {
code = keyname_to_keycode(resolved.c_str());
} catch (UnknownKeycode &e) {
code = KEY_KEY_CODES_COUNT;
code = KEY_UNKNOWN;
warningstream << "TouchScreenGUI: Unknown key '" << resolved
<< "' for '" << key << "', hiding button." << std::endl;
}
Expand Down Expand Up @@ -542,7 +542,7 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc)
{minimap_id, "minimap"},
};
for (const auto &pair : settings_bar_buttons) {
if (id_to_keycode(pair.first) == KEY_KEY_CODES_COUNT)
if (id_to_keycode(pair.first) == KEY_UNKNOWN)
continue;

std::wstring wide = utf8_to_wide(pair.second);
Expand Down Expand Up @@ -571,7 +571,7 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc)
{exit_id, "exit"},
};
for (const auto &pair : rare_controls_bar_buttons) {
if (id_to_keycode(pair.first) == KEY_KEY_CODES_COUNT)
if (id_to_keycode(pair.first) == KEY_UNKNOWN)
continue;

std::wstring wide = utf8_to_wide(pair.second);
Expand Down

0 comments on commit 13fb14d

Please sign in to comment.