Fix: [Win32] Set minimum resolution for timers to 1ms. (#8660)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <signal.h>
|
||||
#include <timeapi.h>
|
||||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
@@ -540,6 +541,9 @@ void *_safe_esp = nullptr;
|
||||
|
||||
static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
||||
{
|
||||
/* Restore system timer resolution. */
|
||||
timeEndPeriod(1);
|
||||
|
||||
/* Disable our event loop. */
|
||||
SetWindowLongPtr(GetActiveWindow(), GWLP_WNDPROC, (LONG_PTR)&DefWindowProc);
|
||||
|
||||
|
Reference in New Issue
Block a user