diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 9708466fe..3fa5d28c0 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -418,13 +418,10 @@ static INT32 GetTypedChar(SDL_Scancode code, SDL_Keysym *sym) break; } - if (SDL_PollEvent(&next_event) && next_event.type == SDL_TEXTINPUT) + while (SDL_PollEvent(&next_event) && next_event.type == SDL_TEXTINPUT) { if (next_event.text.text[1] == '\0') // limit to ASCII - { - if (strlen(next_event.text.text) == 1) - return next_event.text.text[0]; - } + return next_event.text.text[0]; } return Impl_SDL_Scancode_To_Keycode(code); //fallback