aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Headless.SDL2/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Headless.SDL2/Program.cs')
-rw-r--r--Ryujinx.Headless.SDL2/Program.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Ryujinx.Headless.SDL2/Program.cs b/Ryujinx.Headless.SDL2/Program.cs
index 2b169478..6e2172e3 100644
--- a/Ryujinx.Headless.SDL2/Program.cs
+++ b/Ryujinx.Headless.SDL2/Program.cs
@@ -196,6 +196,8 @@ namespace Ryujinx.Headless.SDL2
ControllerType = ControllerType.JoyconPair,
DeadzoneLeft = 0.1f,
DeadzoneRight = 0.1f,
+ RangeLeft = 1.0f,
+ RangeRight = 1.0f,
TriggerThreshold = 0.5f,
LeftJoycon = new LeftJoyconCommonConfig<ConfigGamepadInputId>
{
@@ -299,6 +301,18 @@ namespace Ryujinx.Headless.SDL2
Logger.Info?.Print(LogClass.Application, $"{config.PlayerIndex} configured with {inputTypeName} \"{config.Id}\"");
+ // If both stick ranges are 0 (usually indicative of an outdated profile load) then both sticks will be set to 1.0.
+ if (config is StandardControllerInputConfig controllerConfig)
+ {
+ if (controllerConfig.RangeLeft <= 0.0f && controllerConfig.RangeRight <= 0.0f)
+ {
+ controllerConfig.RangeLeft = 1.0f;
+ controllerConfig.RangeRight = 1.0f;
+
+ Logger.Info?.Print(LogClass.Application, $"{config.PlayerIndex} stick range reset. Save the profile now to update your configuration");
+ }
+ }
+
return config;
}