Set Windows timer resolution to 0,5ms (#4579)

* Fix for https://github.com/RPCS3/rpcs3/issues/4569
(Win 10 update 1803 performance regression)
This commit is contained in:
pauls-gh 2018-05-17 04:00:22 -07:00 committed by Ivan
parent 2eae06454b
commit fdef77d779
3 changed files with 18 additions and 7 deletions

View file

@ -24,6 +24,7 @@
#include <unordered_map>
#ifdef _WIN32
DYNAMIC_IMPORT("ntdll.dll", NtQueryTimerResolution, NTSTATUS(PULONG MinimumResolution, PULONG MaximumResolution, PULONG CurrentResolution));
DYNAMIC_IMPORT("ntdll.dll", NtSetTimerResolution, NTSTATUS(ULONG DesiredResolution, BOOLEAN SetResolution, PULONG CurrentResolution));
DYNAMIC_IMPORT("ntdll.dll", NtWaitForKeyedEvent, NTSTATUS(HANDLE Handle, PVOID Key, BOOLEAN Alertable, PLARGE_INTEGER Timeout));
DYNAMIC_IMPORT("ntdll.dll", NtReleaseKeyedEvent, NTSTATUS(HANDLE Handle, PVOID Key, BOOLEAN Alertable, PLARGE_INTEGER Timeout));