From 4f6a329ea389ae085bf6fc93c161893f85ceb5bf Mon Sep 17 00:00:00 2001 From: Carter Li Date: Tue, 13 Oct 2026 21:29:52 -0500 Subject: [PATCH] Gamepad (Windows): ensures cancelled read completion is fully awaited Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/detection/gamepad/gamepad_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/gamepad/gamepad_windows.c b/src/detection/gamepad/gamepad_windows.c index 945c30e9e..7e3d22b27 100644 --- a/src/detection/gamepad/gamepad_windows.c +++ b/src/detection/gamepad/gamepad_windows.c @@ -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; } }