mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-14 21:17:54 +00:00
[host] windows/delay: cast to LONGLONG instead of int
The type of the QuadPart member of the LARGE_INTEGER union is actually LONGLONG, so we should cast to LONGLONG instead of int. This avoids truncation should (ms * 10000.0f) exceed 2^31-1.
This commit is contained in:
parent
3c0ebd54ec
commit
26df3579a3
1 changed files with 1 additions and 1 deletions
|
@ -41,6 +41,6 @@ void delayInit(void)
|
|||
|
||||
void delayExecution(float ms)
|
||||
{
|
||||
LARGE_INTEGER interval = { .QuadPart = -1 * (int)(ms * 10000.0f) };
|
||||
LARGE_INTEGER interval = { .QuadPart = -1 * (LONGLONG)(ms * 10000.0f) };
|
||||
NtDelayExecution(FALSE, &interval);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue