From 8c15cdd39f8455108ab5f361edbe4aaea34b0f6d Mon Sep 17 00:00:00 2001 From: lVentus Date: Sat, 29 Nov 2025 16:03:02 +0100 Subject: [PATCH] fix DSE paddle mapping mistake and touchpad grid wrong calculation --- JoyShockMapper/src/SDLWrapper.cpp | 3 ++- JoyShockMapper/src/main.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/JoyShockMapper/src/SDLWrapper.cpp b/JoyShockMapper/src/SDLWrapper.cpp index c26d4e06..c5740e90 100644 --- a/JoyShockMapper/src/SDLWrapper.cpp +++ b/JoyShockMapper/src/SDLWrapper.cpp @@ -480,11 +480,12 @@ struct SdlInstance : public JslWrapper break; case JS_TYPE_DS: buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_MISC1) ? 1 << JSOFFSET_MIC : 0; + buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_TOUCHPAD) ? 1 << JSOFFSET_CAPTURE : 0; buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1) ? 1 << JSOFFSET_SR : 0; buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_LEFT_PADDLE1) ? 1 << JSOFFSET_SL : 0; buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2) ? 1 << JSOFFSET_FNR : 0; buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_LEFT_PADDLE2) ? 1 << JSOFFSET_FNL : 0; - // Intentional fall through to the next case + break; case JS_TYPE_DS4: buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_TOUCHPAD) ? 1 << JSOFFSET_CAPTURE : 0; buttons |= SDL_GetGamepadButton(_controllerMap[deviceId]->_sdlController, SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1) ? 1 << JSOFFSET_SL : 0; diff --git a/JoyShockMapper/src/main.cpp b/JoyShockMapper/src/main.cpp index a82fd561..8ec817d0 100644 --- a/JoyShockMapper/src/main.cpp +++ b/JoyShockMapper/src/main.cpp @@ -142,6 +142,7 @@ void touchCallback(int jcHandle, TOUCH_STATE newState, TOUCH_STATE prevState, fl int index0 = -1, index1 = -1; if (point0.isDown()) { + point0.posY += 1e-6f; float row = ceilf(point0.posY * grid_size.value().y()) - 1.f; float col = ceilf(point0.posX * grid_size.value().x()) - 1.f; // COUT << "I should be in button " << row << " " << col << '\n';