diff --git a/src/common/config.cpp b/src/common/config.cpp index ac96d3dc9..e79a52796 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -46,8 +46,6 @@ static std::string logType = "async"; static std::string userName = "shadPS4"; static std::string updateChannel; static std::string chooseHomeTab; -static u16 deadZoneLeft = 2.0; -static u16 deadZoneRight = 2.0; static std::string backButtonBehavior = "left"; static bool useSpecialPad = false; static int specialPadClass = 1; @@ -151,14 +149,6 @@ bool getEnableDiscordRPC() { return enableDiscordRPC; } -u16 leftDeadZone() { - return deadZoneLeft; -} - -u16 rightDeadZone() { - return deadZoneRight; -} - s16 getCursorState() { return cursorState; } @@ -661,8 +651,6 @@ void load(const std::filesystem::path& path) { if (data.contains("Input")) { const toml::value& input = data.at("Input"); - deadZoneLeft = toml::find_or(input, "deadZoneLeft", 2.0); - deadZoneRight = toml::find_or(input, "deadZoneRight", 2.0); cursorState = toml::find_or(input, "cursorState", HideCursorState::Idle); cursorHideTimeout = toml::find_or(input, "cursorHideTimeout", 5); backButtonBehavior = toml::find_or(input, "backButtonBehavior", "left"); @@ -785,8 +773,6 @@ void save(const std::filesystem::path& path) { data["General"]["separateUpdateEnabled"] = separateupdatefolder; data["General"]["compatibilityEnabled"] = compatibilityData; data["General"]["checkCompatibilityOnStartup"] = checkCompatibilityOnStartup; - data["Input"]["deadZoneLeft"] = deadZoneLeft; - data["Input"]["deadZoneRight"] = deadZoneRight; data["Input"]["cursorState"] = cursorState; data["Input"]["cursorHideTimeout"] = cursorHideTimeout; data["Input"]["backButtonBehavior"] = backButtonBehavior; diff --git a/src/common/config.h b/src/common/config.h index 1e6621e21..f726f840c 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -37,8 +37,6 @@ std::string getUserName(); std::string getUpdateChannel(); std::string getChooseHomeTab(); -u16 leftDeadZone(); -u16 rightDeadZone(); s16 getCursorState(); int getCursorHideTimeout(); std::string getBackButtonBehavior(); diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index 1c728ad3b..173b78382 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -106,8 +106,8 @@ int PS4_SYSV_ABI scePadGetControllerInformation(s32 handle, OrbisPadControllerIn pInfo->touchPadInfo.pixelDensity = 1; pInfo->touchPadInfo.resolution.x = 1920; pInfo->touchPadInfo.resolution.y = 950; - pInfo->stickInfo.deadZoneLeft = Config::leftDeadZone(); - pInfo->stickInfo.deadZoneRight = Config::rightDeadZone(); + pInfo->stickInfo.deadZoneLeft = 1; + pInfo->stickInfo.deadZoneRight = 1; pInfo->connectionType = ORBIS_PAD_PORT_TYPE_STANDARD; pInfo->connectedCount = 1; pInfo->connected = true; diff --git a/src/input/input_handler.cpp b/src/input/input_handler.cpp index bed02a6e6..a78a54131 100644 --- a/src/input/input_handler.cpp +++ b/src/input/input_handler.cpp @@ -498,7 +498,7 @@ void ControllerOutput::FinalizeUpdate() { int deadzone = 0; auto ApplyDeadzone = [](s16* value, int deadzone) { if (std::abs(*value) <= deadzone) { - // *value = 0; + *value = 0; } }; Axis c_axis = GetAxisFromSDLAxis(axis); diff --git a/src/qt_gui/kbm_help_dialog.h b/src/qt_gui/kbm_help_dialog.h index 52c47ce99..8d543b7e7 100644 --- a/src/qt_gui/kbm_help_dialog.h +++ b/src/qt_gui/kbm_help_dialog.h @@ -161,6 +161,9 @@ You can find these here, with detailed comments, examples and suggestions for mo You can make an input toggleable with this, for example: Let's say we want to be able to toggle l1 with t. You can then bind l1 to a key you won't use, like kpenter, then bind t to toggle that, so you will end up with this: l1 = kpenter; key_toggle = t, kpenter; +'analog_deadzone' = , ; + value goes from 1 to 127 (no deadzone to max deadzone) + devices: leftjoystick, rightjoystick, l2, r2 )"; } }; \ No newline at end of file