Fix edge case for touch states (#4219)

This commit is contained in:
kalaposfos13 authored and GitHub committed 2026-04-04 15:26:41 -05:00
1 parent fb067bc43f
commit 93733a9ae8
1 file changed
+12 -6
+12 -6
View File
@@ -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;