Do not test for equality when checking if ctrl is pressed.

The initial change I committed worked fine before.
This commit is contained in:
dyharlan 2024-07-11 10:38:57 +08:00
parent 11bb10b44b
commit 7ba7bff3d5

View File

@ -56,7 +56,7 @@ void EventManager::poll_events()
case SDL_KEYUP: {
// Internal shortcuts to trigger mouse grab, intentionally not
// sent to the host.
if (event.key.keysym.sym == SDLK_g && ((SDL_GetModState() & KMOD_LCTRL) == KMOD_CTRL)) {
if (event.key.keysym.sym == SDLK_g && SDL_GetModState() & KMOD_LCTRL) {
if (event.type == SDL_KEYUP) {
toggle_mouse_grab(event.key);
}