mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-24 16:28:14 +00:00
[host/common] windows: provide delayExecution via nsleep
This change moves this platform specific sleep to `common` as the OS agnostic `nsleep` function. Ref PR #661
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
*/
|
||||
|
||||
#include "windows/mousehook.h"
|
||||
#include "windows/delay.h"
|
||||
#include "common/windebug.h"
|
||||
#include "common/time.h"
|
||||
#include "platform.h"
|
||||
|
||||
#include <windows.h>
|
||||
@@ -105,7 +105,7 @@ static DWORD WINAPI updateThreadProc(LPVOID lParam)
|
||||
mouseHook.callback(mouseHook.x, mouseHook.y);
|
||||
|
||||
// limit this to 1000Hz, who has a mouse that updates faster anyway?
|
||||
delayExecution(1.0f);
|
||||
nsleep(1000000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user