Skip to content
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

Binding both keyboard and mouse to the same analog button prevents controlling that analog button using keyboard #14340

Closed
1 of 4 tasks
Looooong opened this issue Apr 3, 2021 · 5 comments
Labels
Input/Controller Input and controller issues
Milestone

Comments

@Looooong
Copy link

Looooong commented Apr 3, 2021

What should happen?

In my case, I bind both the keyboard WASD and the mouse to the analog control. In version 1.8 and prior versions, the analog axis is controlled normally with both keyboard and mouse.

What happens?

In version 1.9 and later versions, only the mouse can control the analog axis, while the keyboard WASD doesn't trigger analog input. It seems that not moving the mouse still sends zero value to the analog control, and it overrides input value from the keyboard WASD. Disabling the mouse regains the control using the keyboard. I tested version 1.9, 1.10, 1.11 and the latest version - 1.11.3. It is possible that the regression was introduced in #12176.

What are you using?

What hardware / device and operating system?

Laptop, Windows 10 64-bit build 19041.

What graphics card (GPU) or mobile phone model?

NVidia GeForce RTX 2070

What PPSSPP version (standalone/official), and did it work before?

Worked in 1.5, 1.6, 1.7, 1.8. Stopped working since 1.9.

Which game or games?

God Of War : Chains of Olympus.

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Include logs or screenshots of issue.
@LunaMoo
Copy link
Collaborator

LunaMoo commented Apr 3, 2021

The thing is, if it doesn't update even without movement, analogs commonly get's stuck at tiny values causing undesired movement even if the threshold is larger since there's some other, random, possibly race issue with analog code and it happened quite a lot with small threshold set for mouse which some users really wanted/needed due to mapping mouse to non analogs where larger threshold causes delays.

@hrydgard
Copy link
Owner

hrydgard commented Apr 3, 2021

Maybe we still can figure out a way to sum up contributions from key and mouse mappings, instead of overwriting. Hm.

@hrydgard hrydgard added this to the v1.13.0 milestone Apr 3, 2021
@hrydgard hrydgard added the Input/Controller Input and controller issues label Apr 3, 2021
@Looooong
Copy link
Author

Looooong commented Apr 4, 2021

In my opinion, the quick fix would be to introduce a slider that controls the mouse threshold. And the long term fix would be to sum up contributions.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Apr 4, 2021

Slider for mouse threshold wouldn't do anything for your issue, that threshold is only used when mapping analog controls to buttons basically saying how far you need to move analog for button to be activated, this was a problem for people mapping mouse to buttons which introduced a delay and made it unusable for them and not directly related to your issue.

Your problem happens because all input set to analog is read, in the past it would work by just ignoring tiny values, however that was causing a different issue where analog control was randomly getting stuck at tiny values, never achieving 0/full stop and causing unwanted movement.

When mapping analog device or mouse to analogs a large deadzone was hiding that bug, however when mapping analog device to buttons deadzone doesn't exist and that's the part where the large threshold was hiding this bug and that's the only thing which linked those issues and why a threshold for the mouse was set to low after allowing 0 to be sent.
Slider for threshold really doesn't benefit mouse, it could benefit analog sticks mapped to buttons, but there the benefit would be to customize it's responsivness.

So no, there's no quick workarounds for this, unless we want to break things for other people to fix this issue for you. PPSSPP would have to combine analog values sent by all devices as Henrik said, basically sending one unified movement after all devices are checked.

@LunaMoo
Copy link
Collaborator

LunaMoo commented May 24, 2021

@Looooong I can no longer reproduce it after #14479, so closing, feel free to report if you're still affected and will reopen, but hopefully it's also fixed for you in latest versions(v1.11.3-690-gdad7f208e and above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input/Controller Input and controller issues
Projects
None yet
Development

No branches or pull requests

4 participants