diff --git a/rpcs3/Input/mm_joystick_handler.cpp b/rpcs3/Input/mm_joystick_handler.cpp index 112620bf37..7c483732fc 100644 --- a/rpcs3/Input/mm_joystick_handler.cpp +++ b/rpcs3/Input/mm_joystick_handler.cpp @@ -77,7 +77,7 @@ bool mm_joystick_handler::Init() m_devices.clear(); m_max_devices = joyGetNumDevs(); - if (m_max_devices <= 0) + if (!m_max_devices) { input_log.error("mmjoy: Driver doesn't support Joysticks"); return false; @@ -408,7 +408,7 @@ std::unordered_map mm_joystick_handler::GetButtonValues(const JOYINFOE if (entry.first == NO_BUTTON) continue; - button_values.emplace(entry.first, js_info.dwButtons & entry.first ? 255 : 0); + button_values.emplace(entry.first, (js_info.dwButtons & entry.first) ? 255 : 0); } if (js_caps.wCaps & JOYCAPS_HASPOV)