Merge pull request #994 from KrossX/master

Fix for odd DualShock rumble (Untested)
This commit is contained in:
Gregory Hainaut 2015-12-04 10:01:19 +01:00
commit ab962bf5c6
3 changed files with 3 additions and 3 deletions

View File

@ -1330,7 +1330,7 @@ u8 CALLBACK PADpoll(u8 value) {
// READ_DATA_AND_VIBRATE
case 0x42:
if (query.lastByte == pad->vibrateI[0]) {
SetVibrate(query.port, query.slot, 1, 255*(0!=value));
SetVibrate(query.port, query.slot, 1, 255*(value&1));
}
else if (query.lastByte == pad->vibrateI[1]) {
SetVibrate(query.port, query.slot, 0, value);

View File

@ -489,7 +489,7 @@ u8 _PADpoll(u8 value)
case CMD_READ_DATA_AND_VIBRATE:
if (curByte == padVib0[curPad])
padVibF[curPad][0] = value;
padVibF[curPad][0] = value&1;
if (curByte == padVib1[curPad])
padVibF[curPad][1] = value;
break;

View File

@ -350,7 +350,7 @@ static class XPadPlugin
switch(index)
{
case 0:
m_pad->m_small = value == 1 ? 128 : 0; // RE4 map menu, value = 2
m_pad->m_small = (value&1) * 128;
break;
case 1:
m_pad->m_large = value;