From e5c825965deed3f313cf966910e7cc662250770f Mon Sep 17 00:00:00 2001 From: Vincent-FK Date: Fri, 12 Mar 2021 00:47:44 +0100 Subject: [PATCH] corrected bug button inputs in log viewer confirmation --- src/messagebox.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/messagebox.cpp b/src/messagebox.cpp index 57e1c81f..68de9088 100644 --- a/src/messagebox.cpp +++ b/src/messagebox.cpp @@ -108,16 +108,20 @@ int MessageBox::exec() { bg.blit(s, 0, 0); s.flip(); - int result = -1; + /*int result = -1; while (result < 0) { InputManager::Button button; if (gmenu2x.input.pollButton(&button) && !buttons[button].empty()) { result = button; } + if (gmenu2x.input.waitForPressedButton(&button) + && !buttons[button].empty()) { + result = button; + } std::this_thread::sleep_for(std::chrono::microseconds(LOOP_DELAY)); - } + }*/ - return result; + return gmenu2x.input.waitForPressedButton(); }