[host] windows: add delayExecution function for more accurate sleeps

This change not only exposes and allows use of NtDelayExecution, but
also moves the code to set the system timer resolution.
This commit is contained in:
Geoffrey McRae
2021-07-17 14:55:22 +10:00
parent e228165ff9
commit 411a6b1e49
6 changed files with 105 additions and 14 deletions

View File

@@ -0,0 +1,16 @@
# IMAGE_IMPORT_DESCRIPTOR
.section .idata$2
.global _head_C__msys64_home_Geoff_LookingGlass_host_release_platform_Windows_capture_DXGI_libd3d11_dll
_head_C__msys64_home_Geoff_LookingGlass_host_release_platform_Windows_capture_DXGI_libd3d11_dll:
.rva hname #Ptr to image import by name list
#this should be the timestamp, but NT sometimes
#doesn't load DLLs when this is set.
.long 0 # loaded time
.long 0 # Forwarder chain
.rva __C__msys64_home_Geoff_LookingGlass_host_release_platform_Windows_capture_DXGI_libd3d11_dll_iname # imported dll's name
.rva fthunk # pointer to firstthunk
#Stuff for compatibility
.section .idata$5
fthunk:
.section .idata$4
hname: