From bc4126acd7c575514f1c576abbc96a9d9092a65d Mon Sep 17 00:00:00 2001 From: MonsterDruide1 <5958456@gmail.com> Date: Wed, 14 Dec 2022 16:04:39 +0100 Subject: [PATCH] TAS: Increase accuracy of Stick inputs --- src/core/hid/emulated_controller.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index f238d6ccd7..5587ee097d 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -210,6 +210,13 @@ void EmulatedController::LoadTASParams() { tas_stick_params[Settings::NativeAnalog::LStick].Set("axis_y", 1); tas_stick_params[Settings::NativeAnalog::RStick].Set("axis_x", 2); tas_stick_params[Settings::NativeAnalog::RStick].Set("axis_y", 3); + + // set to optimal stick to avoid sanitizing the stick and tweaking the coordinates + // making sure they play back in the game as originally written down in the script file + tas_stick_params[Settings::NativeAnalog::LStick].Set("deadzone", 0.0f); + tas_stick_params[Settings::NativeAnalog::LStick].Set("range", 1.0f); + tas_stick_params[Settings::NativeAnalog::RStick].Set("deadzone", 0.0f); + tas_stick_params[Settings::NativeAnalog::RStick].Set("range", 1.0f); } void EmulatedController::LoadVirtualGamepadParams() {