diff --git a/src/posix/sdl/i_input.cpp b/src/posix/sdl/i_input.cpp index 561870a4e3..fe777d77a9 100644 --- a/src/posix/sdl/i_input.cpp +++ b/src/posix/sdl/i_input.cpp @@ -64,8 +64,6 @@ EXTERN_CVAR (Bool, fullscreen) extern int WaitingForKey, chatmodeon; extern constate_e ConsoleState; -static bool DownState[SDL_NUM_SCANCODES]; - static const SDL_Keycode DIKToKeySym[256] = { 0, SDLK_ESCAPE, SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, @@ -190,10 +188,6 @@ static void I_CheckGUICapture () if (wantCapt != GUICapture) { GUICapture = wantCapt; - if (wantCapt) - { - memset (DownState, 0, sizeof(DownState)); - } ResetButtonStates(); } } @@ -441,17 +435,9 @@ void MessagePump (const SDL_Event &sev) ((kmod & KMOD_CTRL) ? GKM_CTRL : 0) | ((kmod & KMOD_ALT) ? GKM_ALT : 0); - if (event.subtype == EV_GUI_KeyDown) + if (event.subtype == EV_GUI_KeyDown && sev.key.repeat) { - if (DownState[sev.key.keysym.scancode]) - { - event.subtype = EV_GUI_KeyRepeat; - } - DownState[sev.key.keysym.scancode] = 1; - } - else - { - DownState[sev.key.keysym.scancode] = 0; + event.subtype = EV_GUI_KeyRepeat; } switch (sev.key.keysym.sym)