diff --git a/Source/Core/Core/IOS/USB/USB_KBD.cpp b/Source/Core/Core/IOS/USB/USB_KBD.cpp index ac006c1444..63b41cb230 100644 --- a/Source/Core/Core/IOS/USB/USB_KBD.cpp +++ b/Source/Core/Core/IOS/USB/USB_KBD.cpp @@ -219,13 +219,10 @@ IPCCommandResult USB_KBD::IOCtl(const IOCtlRequest& request) return GetDefaultReply(IPC_SUCCESS); } -bool USB_KBD::IsKeyPressed(int _Key) +bool USB_KBD::IsKeyPressed(int key) const { #ifdef _WIN32 - if (GetAsyncKeyState(_Key) & 0x8000) - return true; - else - return false; + return (GetAsyncKeyState(key) & 0x8000) != 0; #else // TODO: do it for non-Windows platforms return false; diff --git a/Source/Core/Core/IOS/USB/USB_KBD.h b/Source/Core/Core/IOS/USB/USB_KBD.h index d0039d4ba7..0936a697d5 100644 --- a/Source/Core/Core/IOS/USB/USB_KBD.h +++ b/Source/Core/Core/IOS/USB/USB_KBD.h @@ -54,7 +54,7 @@ private: std::array m_OldKeyBuffer{}; u8 m_OldModifiers = 0; - virtual bool IsKeyPressed(int _Key); + bool IsKeyPressed(int key) const; // This stuff should probably die enum