Moonlight-Switch icon indicating copy to clipboard operation
Moonlight-Switch copied to clipboard

Suggestion for Stick Deadzone Configuration in Moonlight Switch

Open c0mec0c0s opened this issue 9 months ago • 10 comments

Congratulations on the project and all the work you've put into it. Right now, it looks like a nearly finished project, just needing a few small refinements.

One of the reasons it's not my definitive option for regular use yet is the ability to configure the stick deadzones. This is a setting that Moonlight for Android has, and I always set it to 1% since I don't like having a deadzone—though it can be useful if drift occurs.

I'm not sure how complicated it would be to implement this, but it would solve my issue of having to install Android on my Nintendo Switch just to use Moonlight, allowing me to use Moonlight Switch instead.

Thank you so much, and keep up the great work!

c0mec0c0s avatar Mar 29 '25 07:03 c0mec0c0s

Thanks for nice words! I don’t really think it should be something too complicated, I’ll try to check how it was done in Moonlight-Android and redo same for Moonlight-Switch, probably it just nullify certain range of stick values from 0 to percentage of dead zone

XITRIX avatar Mar 29 '25 10:03 XITRIX

Added dead zones configuration, can you test it if it works fine for you? [Actions Test Build]

XITRIX avatar Mar 29 '25 15:03 XITRIX

Thank you for being attentive and trying to fix it so quickly!

I tested version 1.2.4 from the link you provided, but I didn’t notice any difference. The deadzone is still present on both sticks, sorry.

I can feel that there’s about 1 to 2 millimeters of stick tilt that doesn’t register any movement. In the Android version, this issue is eliminated when reducing the slidable configuration to 1% (which is set to 7% by default).

c0mec0c0s avatar Mar 29 '25 20:03 c0mec0c0s

Sorry, I probably had to explain what I did. I added setting to configure your dead zone. Personally I do not need it at all, so I'll keep this setting disabled on my Switch, but if you have stick drift you can change this value according to how bad your drift is

UP. wait a second, you are saying that there WAS a dead zone? Looks like I did not get your request from the beginning. There was no dead zone implementation at all, Moonlight translated pure values received from HOS (LibNX). So if you HAD a dead zone and you wanted to get rid of it, I'm afraid that it could be not possible, because it's the was how Switch provide this values into OS

Could you try to check does stick behave the same on this calibration screen? Image

XITRIX avatar Mar 29 '25 21:03 XITRIX

Hello, don't worry, maybe I didn't explain it well.

I don't want to use a dead zone, but I appreciate it in case someone does need it.

I have checked the Switch calibration, and it behaves correctly. Additionally, when testing the sticks, HOS detects and moves them correctly across the entire range, and there is no dead zone.

When I use the sticks in Moonlight-Switch, I notice a tilt of about 1 to 2 millimeters where Moonlight does not detect movement. This is why I was asking you to disable that dead zone.

If there was no dead zone configured from the beginning and the values interpreted by Moonlight are the ones received from HOS, I don't understand where the issue lies.

Could I ask you to do a test and possibly make a change?

If you use Moonlight-Switch v1.2.4 with the dead zone OFF, connect to a Windows PC with the latest version of Sunshine, and play a game (for example, Horizon or any other game), try moving the right stick little by little, tilting it to the side.
Do you notice any space without movement?

This would help determine whether the dead zone issue is caused by Moonlight, Sunshine, or my Nintendo Switch.

If it turns out to be a problem with Moonlight and the minimum value that can be configured in version 1.2.4 is 0, would it be possible to allow negative values to further reduce the dead zone threshold?
This might sound a bit crazy, but it could be a way to eliminate that dead zone.

c0mec0c0s avatar Mar 29 '25 22:03 c0mec0c0s

I am almost convinced that it is not Sunshine or my Nintendo Switch (sticks) because when I use LineageOS and Moonlight-Android, this dead zone does not exist. The console is the same, and the Windows PC running the game is the same, the only difference is the operating system and the version of Moonlight.

c0mec0c0s avatar Mar 29 '25 22:03 c0mec0c0s

For me looks like I have exactly the same minimal dead zone in moonlight app and HOS calibration app. Let me try to check on Android

XITRIX avatar Mar 29 '25 22:03 XITRIX

I have done tests from:

Windows to Windows Android to Windows HOS to Windows Directly on Windows without a controller

I think you are right, every setup has a certain percentage of dead zone, even with different gamepads. It must be the minimum physical dead zone that all gamepads have.

I apologize for wasting your time. For some reason, I perceived that the Moonlight-Switch version had a larger dead zone.

Definitely, as you pointed out, there is no additional dead zone, it's just the minimal one that the Nintendo Switch and all gamepads have by default.

Still, I really appreciate your effort and the updates to Moonlight-Switch to allow dead zone configuration for users experiencing drift and wanting to avoid it.

c0mec0c0s avatar Mar 29 '25 23:03 c0mec0c0s

One last question: Will you release version 1.2.4, or will you wait to implement some additional improvements?

c0mec0c0s avatar Mar 29 '25 23:03 c0mec0c0s

If nothing will come into my mind and if I will not find bugs, I’ll release it today/tomorrow

XITRIX avatar Mar 30 '25 08:03 XITRIX