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

Change bind hold default on Android #17704

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

zoltanvb
Copy link
Contributor

Description

Due to touchscreen quick tap function, binding runs into problems with the default setting of bind_hold = 0 that works well on other platforms. Using a nonzero value avoids that problem.

Some investigation notes are in the (now closed) #17157 .

Implementing #17644 would be more complex - bind_hold is currently an uint, so it can't be assigned a value of 0.1 as-is, and changing the type of existing config keys is a no-no, so it would need to be stored under a new name with some additional logic. Extra logic for the value 0 in case of Android is again doable, but would complicate the code more, and it needs more testing than what I am prepared for currently.

This PR will enhance the situation, while the negative effects are quite small - few second slower binding (which should be done zero times in case of a known controller that has autoconfig, and one time per RetroArch install in case of random controller). The other negative effect (not being able to bind some faulty controllers) should not occur any more since #16256 .

Related Issues

Closes #16217

Related Pull Requests

#15909

Reviewers

@sonninnos

Due to touchscreen quick tap function, binding runs into problems
with the default setting that works well on other platforms. Using
a nonzero value avoids that problem.
@LibretroAdmin
Copy link
Contributor

LibretroAdmin commented Mar 16, 2025

What about turning this from ANDROID into RARCH_MOBILE?

@zoltanvb
Copy link
Contributor Author

I've seen no reports of the same thing happening on iOS, but it is easy to test, if someone has a suitable device at hand (I don't, unfortunately):

  • go to Settings / Input
  • make sure "Bind Hold" is 0 (which is the current default)
  • go to Hotkeys
  • navigate to an unused hotkey (such as "start replay"), and trigger the bind by touchscreen tap
  • in the bad case, bind is immediately asssigned to mouse button 1
  • reset the value with long press
  • set Bind Hold to something other than 0
  • trigger bind again, see if it waits for input

@zoltanvb
Copy link
Contributor Author

@warmenhoven
Thank you for testing, recording it here for future reference:

In step 4,
trigger the bind by touchscreen tap
This doesn't happen without turning on the touchmouse
If you do turn on the touchmouse, then yes with bind hold set to 0, it immediately picks it up as mouse 1

I can't find the default setting for the touch mouse, is it something one has to explicitly enable? If that is the case, I would not update the PR as it would be better to preserve bind hold 0 on all platforms where it does not cause problems, since it is a nicer experience.

@sonninnos
Copy link
Collaborator

sonninnos commented Mar 19, 2025

Yes, that bind-tap-mouse-1 thing happens here on Android too and hold 1 fixes it nicely.

@LibretroAdmin LibretroAdmin merged commit a58ac85 into libretro:master Mar 20, 2025
31 checks passed
@davidhedlund
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bind Timeout regression bug for Android
4 participants