From fb9274c359d414f254da42f96323be64a5358217 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Fri, 28 Jul 2023 08:10:54 +0200 Subject: [PATCH] WiimoteReal/IOWin: Use correct error type in the default case. --- Source/Core/Core/HW/WiimoteReal/IOWin.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp index be75a204cf..f931bb10a3 100644 --- a/Source/Core/Core/HW/WiimoteReal/IOWin.cpp +++ b/Source/Core/Core/HW/WiimoteReal/IOWin.cpp @@ -298,17 +298,8 @@ int IOWritePerWriteFile(HANDLE& dev_handle, OVERLAPPED& hid_overlap_write, // Pending is no error! break; default: - 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); - } + WARN_LOG_FMT(WIIMOTE, "IOWrite[WWM_WRITE_FILE]: Error on WriteFile: {}", + Common::GetWin32ErrorString(error)); CancelIo(dev_handle); return 0; }