mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
static analysis: suspicious code
This commit is contained in:
parent
7a6a96254c
commit
4f52c67566
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ bool mm_joystick_handler::Init()
|
||||||
m_devices.clear();
|
m_devices.clear();
|
||||||
|
|
||||||
m_max_devices = joyGetNumDevs();
|
m_max_devices = joyGetNumDevs();
|
||||||
if (m_max_devices <= 0)
|
if (!m_max_devices)
|
||||||
{
|
{
|
||||||
input_log.error("mmjoy: Driver doesn't support Joysticks");
|
input_log.error("mmjoy: Driver doesn't support Joysticks");
|
||||||
return false;
|
return false;
|
||||||
|
@ -408,7 +408,7 @@ std::unordered_map<u64, u16> mm_joystick_handler::GetButtonValues(const JOYINFOE
|
||||||
if (entry.first == NO_BUTTON)
|
if (entry.first == NO_BUTTON)
|
||||||
continue;
|
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)
|
if (js_caps.wCaps & JOYCAPS_HASPOV)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue