Merge pull request #99 from dyharlan/master

Do not test for equality when checking if ctrl is pressed.
This commit is contained in:
dingusdev 2024-07-10 20:03:34 -07:00 committed by GitHub
commit f31c71e430
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);
}