mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 01:45:12 -04:00
[misc] remove no longer needed XP workarounds
This commit is contained in:
parent
c5f4e5a2ee
commit
903ac993f2
23 changed files with 299 additions and 937 deletions
|
@ -381,7 +381,8 @@ BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWr
|
|||
// This is needed, for instance, if you are waiting for a thread that may issue uprintf's
|
||||
DWORD WaitForSingleObjectWithMessages(HANDLE hHandle, DWORD dwMilliseconds)
|
||||
{
|
||||
DWORD res, dwCurTime, dwEndTime = GetTickCount() + dwMilliseconds;
|
||||
uint64_t CurTime, EndTime = GetTickCount64() + dwMilliseconds;
|
||||
DWORD res;
|
||||
MSG msg;
|
||||
|
||||
do {
|
||||
|
@ -399,11 +400,11 @@ DWORD WaitForSingleObjectWithMessages(HANDLE hHandle, DWORD dwMilliseconds)
|
|||
res = MsgWaitForMultipleObjects(1, &hHandle, FALSE, dwMilliseconds, QS_ALLINPUT);
|
||||
|
||||
if (dwMilliseconds != INFINITE) {
|
||||
dwCurTime = GetTickCount();
|
||||
CurTime = GetTickCount64();
|
||||
// Account for the case where we may reach the timeout condition while
|
||||
// processing timestamps
|
||||
if (dwCurTime < dwEndTime)
|
||||
dwMilliseconds = dwEndTime - dwCurTime;
|
||||
if (CurTime < EndTime)
|
||||
dwMilliseconds = (DWORD) (EndTime - CurTime);
|
||||
else
|
||||
res = WAIT_TIMEOUT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue