-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PAD: Add anti-deadzone #9154
PAD: Add anti-deadzone #9154
Conversation
Alright, I think it's ready again. There's a linear and radial method for both deadzone and anti-deadzone with a toggle setting. Both features remap the range so result might not reach the edges perfectly, a bit of scaling/sensitivity would do the trick. I was considering linear deadzone being default since it's being applied to a remapped control instead of a known stick source. When mixing controls, radial deadzone can give some pretty odd feeling. Anyhow, since there's #6718, radial is the default then. As for anti-deadzone, the usability would depend on how the game implemented its deadzone. |
Rebase attempt. Note: This PR needs testing with good gamepads. |
0da9a33
to
57e1620
Compare
Rebased. Closing as I cannot test this changes and I'm too lazy to keep it updated. Here's a windows buildbot backup in case someome wants to test it. PCSX2-windows-Qt-x64-SSE4-pr[9154]-sha[1c48727]-title[PAD Add anti-deadzone].zip |
@KrossX I can test this with a flight stick in AC5, what do I need to check for? |
No idea. First you would need to find a game with noticeable deadzone, then try the antideadzone setting. Issue #9153 mentions Gran Turismo 3: A-spec with noticeable deadzone for pedals. So you would need to configure the pedals to some analog control and see if you notice a game deadzone, then try the antideadzone setting. Other than that, just general usage of deadzone, antideadzone and scaling and check if things break. |
From testing so far: Linear anti-deadzone seems to work fine, however unchecking linear deadzone results in weird behavior where diagonal movement is nearly impossible. Deflecting the stick partially in one axis and then trying to deflect it in another while keeping the same input in the original axis, causes the input in initial axis to reduce until hitting 0 near diagonal, and then input in the other axis is increased while approaching it. Also rotating the stick around the rim reveals the deadzones to be back in their original size. It's hard for me to even visualize what shape the deadzones are here, but they're definitely not gone even though linear completely eliminates them at same settings. As for triggers: They seem to work fine, however as I said, only L2 and R2 have the anti-deadzone applied. It does behave as expected for them. All inputs might need this setting (though they also need sensitivity way more urgently - most games have 0 inner deadzone for buttons and bumpers anyway but plenty of outer deadzone, warranting sensitivity < 100%) since all buttons are pressure-sensitive on DS2 with exception of stick presses and inner function buttons. And if not, then at the very least the trigger settings should apply to R1 and L1 - there is no functional difference between them on DS2, they're both analog, and some games benefit from swapping them (for instance to get AC6 style analog throttle on triggers in AC5). Currently only deadzone is adjustable on per-button basis. But I guess this is another feature request altogether. Also another bug altogether: it seems that deadzone for buttons and triggers does not remap the range - it skips it. When the trigger/button input crosses deadzone threshold, the output jumps straight to the value equal to input, e.g. if deadzone is set to 20%, instead of 0 input at 19% and 1% at 21% it will jump straight to 21% at 21%. |
Trigger deadzone is applied to whatever triggers There's no log, it would spam the console since it would get trigger per each input thing This changes only affect the DualShock2 code, no specific code for wheels now that you mention it. I don't even know where that code is... As for the last part about button deadzone... there's a section of code below analog/trigger which seems to do things but didn't touch it, maybe that's the thing. Triggers should remap the range, so that's a bug I can try to fix in a bit. |
Ok, trigger deadzones now work fine. EDIT: Tried Kingdom Hearts, same, linear works fine with smooth direction input along the rim once anti-deadzone is tuned, radial is just cursed, it's hard to get diagonal movement. Guess, it's linear in this game too. |
You can check the difference between linear and radial here. When I tried with pokopom it was great for the x360 controller stick. This would be the idea: See if radial works fine for deadzone though. If it does, great. For anti-deadzone, it would depend on what kind of deadzone the game uses since it's a compensation thing, also maybe some extra scaling helps. This would greatly benefit from a pad testing program that showed some graphics for the sticks. |
@KrossX Hi! I'm really interested in an anti-deadzone setting for analog sticks in PCSX2, so this only works in the versions you built or there is a chance of having it in the latest versions of PCSX2? |
Adds antideadzone to axes and triggers.
Anti-deadzone is a feature to overcome a game's deadzone while keeping usable range on the used controller. The way implemented is simply linear since you can remake the axes freely.
I was gonna add radial option but that means a toggle for linear/radial deadzone and another for antideadzone. Could be left for another PR. (Edit: #6718, I guess radial gotta be implemented. Booo~)
Also, when using radial values, there's a possibility to scale the value only when a threshold instead of always. It's the method I was using in Pokopom for x360 controllers to reach the corners while keeping most of the stick range usable.
Closes #9153
PS: I think some code change only affects UI/Binding and I doubt doing an anti-deadzone check is necessary there.