Skip to content

Commit

Permalink
Merge pull request #11978 from AdmiralCurtiss/wiimote-S_FALSE
Browse files Browse the repository at this point in the history
WiimoteReal/IOWin: Don't try to print error message for non-errors.
  • Loading branch information
AdmiralCurtiss committed Jun 30, 2023
2 parents e71f42f + 00bf5f5 commit 82c9868
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Source/Core/Core/HW/WiimoteReal/IOWin.cpp
Expand Up @@ -298,8 +298,17 @@ int IOWritePerWriteFile(HANDLE& dev_handle, OVERLAPPED& hid_overlap_write,
// Pending is no error!
break;
default:
WARN_LOG_FMT(WIIMOTE, "IOWrite[WWM_WRITE_FILE]: Error on WriteFile: {}",
Common::HRWrap(error));
if (FAILED(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);
return 0;
}
Expand Down

0 comments on commit 82c9868

Please sign in to comment.