main: (Windows) Set the current timer resolution to the maximum

Increases the precision of thread sleeps on Windows.
This commit is contained in:
Morph 2023-03-01 20:07:59 -05:00
parent 22d58e43dc
commit feea72a15e
2 changed files with 13 additions and 0 deletions

View file

@ -42,6 +42,8 @@
#include <windows.h>
#include <shellapi.h>
#include "common/windows/timer_resolution.h"
#endif
#undef _UNICODE
@ -314,6 +316,8 @@ int main(int argc, char** argv) {
#ifdef _WIN32
LocalFree(argv_w);
Common::Windows::SetCurrentTimerResolutionToMaximum();
#endif
MicroProfileOnThreadCreate("EmuThread");