This commit is contained in:
counter185 2024-08-28 13:53:07 +02:00
parent 4e6e90dfb9
commit 698dade864
1 changed files with 3 additions and 1 deletions

View File

@ -134,12 +134,14 @@ bool GameController::SetVibration(u8 smallMotor, u8 largeMotor) {
void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, float y) {
if (touchIndex < 2) { // DS4 has 2-point multitouch
std::scoped_lock lock{m_mutex};
auto state = GetLastState();
state.time = Libraries::Kernel::sceKernelGetProcessTime();
state.touchpad[touchIndex].state = touchDown;
state.touchpad[touchIndex].x = static_cast<u16>(x * 1920);
state.touchpad[touchIndex].y = static_cast<u16>(y * 1080);
AddState(state);
}
}