mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
Input: refactor vibration
There's no need to deal with vibration levels outside of the handlers. All we need to know is the 0-255 DS3 range which is given by the u8 type.
This commit is contained in:
parent
a1f9ff0aaa
commit
ddd261c943
18 changed files with 59 additions and 76 deletions
|
@ -197,15 +197,15 @@ void pad_thread::Init()
|
|||
}
|
||||
}
|
||||
|
||||
void pad_thread::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor)
|
||||
void pad_thread::SetRumble(const u32 pad, u8 large_motor, bool small_motor)
|
||||
{
|
||||
if (pad >= m_pads.size())
|
||||
return;
|
||||
|
||||
if (m_pads[pad]->m_vibrateMotors.size() >= 2)
|
||||
{
|
||||
m_pads[pad]->m_vibrateMotors[0].m_value = largeMotor;
|
||||
m_pads[pad]->m_vibrateMotors[1].m_value = smallMotor ? 255 : 0;
|
||||
m_pads[pad]->m_vibrateMotors[0].m_value = large_motor;
|
||||
m_pads[pad]->m_vibrateMotors[1].m_value = small_motor ? 255 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue