From 12ef19719df76a5204c46ac1417fd9d97f50d87f Mon Sep 17 00:00:00 2001 From: Miguel Horta Date: Sat, 27 Apr 2024 09:33:03 +0100 Subject: [PATCH] fix: revert boggus merge in sdl_v it fixes ctrl and shift buttons not working Fixes issue #5 --- src/video/sdl_v.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 65064e16a4..d7f8b69683 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -706,11 +706,6 @@ void VideoDriver_SDL::InputLoop() int numkeys; Uint8 *keys = SDL_GetKeyState(&numkeys); - bool old_ctrl_pressed = _ctrl_pressed; - - _ctrl_pressed = !!(mod & KMOD_CTRL); - _shift_pressed = !!(mod & KMOD_SHIFT); - /* Speedup when pressing tab, except when using ALT+TAB * to switch to another application. */ this->fast_forward_key_pressed = keys[SDLK_TAB] && (mod & KMOD_ALT) == 0; @@ -723,6 +718,7 @@ void VideoDriver_SDL::InputLoop() (keys[SDLK_DOWN] ? 8 : 0); if (old_ctrl_pressed != _ctrl_pressed) HandleCtrlChanged(); + old_ctrl_pressed = _ctrl_pressed; #ifdef __ANDROID__ if (!this->set_clipboard_text.empty()) {