Skip to content

Commit e57b40c

Browse files
author
Semphris
committed
Fixed bug where controls from players other than the first (notably, WASD and IJKL) would interact in menus, making it hard to input any text that contain those characters (WASD/IJKL)
1 parent 21980c6 commit e57b40c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/control/keyboard_manager.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,12 @@ KeyboardManager::process_menu_key_event(const SDL_KeyboardEvent& event)
220220
break;
221221
default:
222222
if (m_keyboard_config.m_keymap.count(event.keysym.sym) == 0)
223-
{
224223
return;
225-
}
224+
225+
// Forbid events from players other than the first in menus
226+
if (m_keyboard_config.m_keymap[event.keysym.sym].player != 0)
227+
return;
228+
226229
control = m_keyboard_config.m_keymap[event.keysym.sym].control;
227230
break;
228231
}

0 commit comments

Comments
 (0)