WiimoteReal/IOWin: Use correct error type in the default case.

This commit is contained in:
Admiral H. Curtiss 2023-07-28 08:10:54 +02:00
parent cd923718c3
commit fb9274c359
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 2 additions and 11 deletions

View File

@ -298,17 +298,8 @@ int IOWritePerWriteFile(HANDLE& dev_handle, OVERLAPPED& hid_overlap_write,
// Pending is no error! // Pending is no error!
break; break;
default: default:
if (FAILED(error)) WARN_LOG_FMT(WIIMOTE, "IOWrite[WWM_WRITE_FILE]: Error on WriteFile: {}",
{ Common::GetWin32ErrorString(error));
WARN_LOG_FMT(WIIMOTE, "IOWrite[WWM_WRITE_FILE]: Error on WriteFile: {}",
Common::HRWrap(error));
}
else
{
WARN_LOG_FMT(WIIMOTE,
"IOWrite[WWM_WRITE_FILE]: Unexpected error code from WriteFile: 0x{:08x}",
error);
}
CancelIo(dev_handle); CancelIo(dev_handle);
return 0; return 0;
} }