From bc0ddbb05a9872a72d6af0afc5caa464ddb1a417 Mon Sep 17 00:00:00 2001 From: DrChat Date: Sun, 11 Sep 2016 21:26:35 -0500 Subject: [PATCH] Fix UI thread not waking up from input --- src/xenia/ui/loop_win.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/xenia/ui/loop_win.cc b/src/xenia/ui/loop_win.cc index c901250c5..b024fa0cd 100644 --- a/src/xenia/ui/loop_win.cc +++ b/src/xenia/ui/loop_win.cc @@ -52,14 +52,9 @@ Win32Loop::~Win32Loop() { void Win32Loop::ThreadMain() { MSG msg; - while (!should_exit_) { - DWORD result = - MsgWaitForMultipleObjectsEx(0, nullptr, INFINITE, QS_ALLINPUT, 0); - - if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } + while (!should_exit_ && GetMessage(&msg, NULL, 0, 0)) { + TranslateMessage(&msg); + DispatchMessage(&msg); // Process queued functions. std::lock_guard lock(posted_functions_mutex_);