From dc16104cfd83e2e17f53de80a1d01ee8c8599bf2 Mon Sep 17 00:00:00 2001 From: offtkp Date: Fri, 25 Mar 2022 02:19:46 +0200 Subject: [PATCH 1/2] fixes #442 --- SDL/gui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SDL/gui.c b/SDL/gui.c index d5c899b..c7a30aa 100644 --- a/SDL/gui.c +++ b/SDL/gui.c @@ -1196,6 +1196,7 @@ void run_gui(bool is_running) current_selection = 0; scroll = 0; do { + SDL_WaitEvent(&event); /* Convert Joypad and mouse events (We only generate down events) */ if (gui_state != WAITING_FOR_KEY && gui_state != WAITING_FOR_JBUTTON) { switch (event.type) { @@ -1650,5 +1651,5 @@ void run_gui(bool is_running) render_texture(pixels, NULL); #endif } - } while (SDL_WaitEvent(&event)); + } while (true); } From 851d44869f223bc2a69f67e94d2f71b13e3c3d8f Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 29 Apr 2022 01:11:11 +0300 Subject: [PATCH 2/2] No reason for this to be a do...while --- SDL/gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDL/gui.c b/SDL/gui.c index c7a30aa..1dd6207 100644 --- a/SDL/gui.c +++ b/SDL/gui.c @@ -1195,7 +1195,7 @@ void run_gui(bool is_running) recalculate_menu_height(); current_selection = 0; scroll = 0; - do { + while (true) { SDL_WaitEvent(&event); /* Convert Joypad and mouse events (We only generate down events) */ if (gui_state != WAITING_FOR_KEY && gui_state != WAITING_FOR_JBUTTON) { @@ -1651,5 +1651,5 @@ void run_gui(bool is_running) render_texture(pixels, NULL); #endif } - } while (true); + } }