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_);