Fixed rumble packet size handling in XUSB devices

This commit is contained in:
Benjamin Höglinger-Stelzer
2020-11-30 17:39:59 +01:00
parent 3fcdec87da
commit ad1373248d
2 changed files with 16 additions and 10 deletions

View File

@@ -621,7 +621,7 @@ VIGEM_ERROR vigem_target_x360_register_notification(
continue;
}
if (GetLastError() == ERROR_ACCESS_DENIED)
if (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_OPERATION_ABORTED)
{
CloseHandle(lOverlapped.hEvent);
return;
@@ -712,7 +712,7 @@ VIGEM_ERROR vigem_target_ds4_register_notification(
continue;
}
if (GetLastError() == ERROR_ACCESS_DENIED)
if (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_OPERATION_ABORTED)
{
CloseHandle(lOverlapped.hEvent);
return VIGEM_ERROR_INVALID_TARGET;