summaryrefslogtreecommitdiff
path: root/src/os/windows/crashlog_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/windows/crashlog_win.cpp')
-rw-r--r--src/os/windows/crashlog_win.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp
index 872e472d5..b5916dd26 100644
--- a/src/os/windows/crashlog_win.cpp
+++ b/src/os/windows/crashlog_win.cpp
@@ -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);