Gamepad (Windows): ensures cancelled read completion is fully awaited
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This commit is contained in:
1 parent
cb73fdcfc9
commit
4f6a329ea3
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user