Gamepad (Windows): ensures cancelled read completion is fully awaited

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This commit is contained in:
Carter LiandCopilot Autofix powered by AI authored and GitHub committed 2026-10-13 21:29:52 -05:00
1 parent cb73fdcfc9
commit 4f6a329ea3
1 file changed
+1 -1
+1 -1
View File
@@ -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
// cancellation is waited for before returning.
CancelIoEx(hHidFile, &overlapped);
GetOverlappedResultEx(hHidFile, &overlapped, &read, INFINITE, TRUE);
GetOverlappedResultEx(hHidFile, &overlapped, &read, INFINITE, FALSE);
return false;
}
}