mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-11-17 19:44:36 +01:00
Fix edge case for touch states (#4219)
This commit is contained in:
1 parent
fb067bc43f
commit
93733a9ae8
1 file changed
+12
-6
@@ -423,12 +423,18 @@ int ProcessStates(s32 handle, OrbisPadData* pData, Input::GameController& contro
|
||||
states[i].touchpad[1].ID = 2;
|
||||
}
|
||||
|
||||
pData[i].touchData.touch[0].x = states[i].touchpad[0].x;
|
||||
pData[i].touchData.touch[0].y = states[i].touchpad[0].y;
|
||||
pData[i].touchData.touch[0].id = states[i].touchpad[0].ID;
|
||||
pData[i].touchData.touch[1].x = states[i].touchpad[1].x;
|
||||
pData[i].touchData.touch[1].y = states[i].touchpad[1].y;
|
||||
pData[i].touchData.touch[1].id = states[i].touchpad[1].ID;
|
||||
if (!states[i].touchpad[0].state && states[i].touchpad[1].state) {
|
||||
pData[i].touchData.touch[0].x = states[i].touchpad[1].x;
|
||||
pData[i].touchData.touch[0].y = states[i].touchpad[1].y;
|
||||
pData[i].touchData.touch[0].id = states[i].touchpad[1].ID;
|
||||
} else {
|
||||
pData[i].touchData.touch[0].x = states[i].touchpad[0].x;
|
||||
pData[i].touchData.touch[0].y = states[i].touchpad[0].y;
|
||||
pData[i].touchData.touch[0].id = states[i].touchpad[0].ID;
|
||||
pData[i].touchData.touch[1].x = states[i].touchpad[1].x;
|
||||
pData[i].touchData.touch[1].y = states[i].touchpad[1].y;
|
||||
pData[i].touchData.touch[1].id = states[i].touchpad[1].ID;
|
||||
}
|
||||
pData[i].connected = connected;
|
||||
pData[i].timestamp = states[i].time;
|
||||
pData[i].connectedCount = connected_count;
|
||||
|
||||
Reference in new issue
Block a user