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

Simplify the touch d-pad code. #18028

Merged
merged 2 commits into from
Aug 31, 2023
Merged

Simplify the touch d-pad code. #18028

merged 2 commits into from
Aug 31, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Aug 31, 2023

Due to #17950 I had a look at this code and found some room to simplify (now we never do more than one __CtrlUpdateButtons call), but I don't think this is likely to fix anything.

Due to #17950 I had a look at this code and found some room to simplify,
but I don't think this is likely to fix anything.
@hrydgard hrydgard added the Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. label Aug 31, 2023
@hrydgard hrydgard added this to the v1.16.0 milestone Aug 31, 2023
@hrydgard hrydgard merged commit f02f638 into master Aug 31, 2023
18 checks passed
@hrydgard hrydgard deleted the simplify-touch-dpad branch August 31, 2023 10:23
if (pressed & dir[i]) {
if (g_Config.bHapticFeedback) {
System_Vibrate(HAPTIC_VIRTUAL_KEY);
__CtrlUpdateButtons(ctrlMask, CTRL_LEFT | CTRL_RIGHT | CTRL_UP | CTRL_DOWN);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this makes the assumption that you would never use two inputs at once that affect the dpad. Before it was careful to only release things that were changed, but now any touch to the d-pad will FORCE release any other directions.

So if you have a combo key that presses say, up and triangle for some reason - and then you press left, the up button will be force released and discarded.

Is that intentional? I don't know if any games might motivate that sort of combo button, but it doesn't seem impossible at all.

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, hm, I overlookee that. Might change it back

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed I forgot to fix this. Fix going into 1.16.1

hrydgard added a commit that referenced this pull request Sep 11, 2023
hrydgard added a commit that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup Cleanup to make future work easier. Needs to be done sometimes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants