PeekMessage WM_TIMER in message pump to increase timer reliabilityw

pull/914/head
robnee 2021-01-28 18:23:07 -05:00
parent ebb194eda6
commit 37e4e51764
1 changed files with 4 additions and 0 deletions

View File

@ -1699,6 +1699,10 @@ void RunGui() {
while(GetMessage(&msg, NULL, 0, 0)) { while(GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
// look for WM_TIMER to boost their priority
MSG timer_msg;
PeekMessage(&timer_msg, nullptr, WM_TIMER, WM_TIMER, PM_NOREMOVE);
} }
} }