use SDL_PeepEvents again

grrrrrrr
This commit is contained in:
Alug committed 2024-04-02 19:19:56 +02:00
1 parent 07e50c40a3
commit bd2fe5b9be
1 file changed
+1 -1
+1 -1
View File
@@ -414,7 +414,7 @@ static INT32 GetTypedChar(SDL_Scancode code, SDL_Keysym *sym)
if (Text_Input_Only)
{
while (SDL_PollEvent(&next_event) && next_event.type == SDL_TEXTINPUT)
if (SDL_PeepEvents(&next_event, 1, SDL_PEEKEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) == 1 && next_event.type == SDL_TEXTINPUT)
{
if (next_event.text.text[1] == '\0') // limit to ASCII
return next_event.text.text[0];