mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 07:44:06 +01:00
Gamepad (Windows): ensures cancelled read completion is fully awaited
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -113,7 +113,7 @@ static bool readHidReport(HANDLE hHidFile, uint8_t* buffer, uint32_t length, DWO
|
|||||||
// than by handle (CancelIo would take every other read on the same handle with it), and the
|
// than by handle (CancelIo would take every other read on the same handle with it), and the
|
||||||
// cancellation is waited for before returning.
|
// cancellation is waited for before returning.
|
||||||
CancelIoEx(hHidFile, &overlapped);
|
CancelIoEx(hHidFile, &overlapped);
|
||||||
GetOverlappedResultEx(hHidFile, &overlapped, &read, INFINITE, TRUE);
|
GetOverlappedResultEx(hHidFile, &overlapped, &read, INFINITE, FALSE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user