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

ControlMapper: Change the callbacks to be more suitable for the upcoming refactor. #17209

Merged
merged 3 commits into from
Mar 30, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Mar 29, 2023

Another bunch of minor changes broken out, for easier reviewing and bisection.

@hrydgard hrydgard added Input/Controller Input and controller issues Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. labels Mar 29, 2023
@hrydgard hrydgard added this to the v1.15.0 milestone Mar 29, 2023
Comment on lines 207 to 210
void __CtrlSetAllButtons(u32 buttonBits)
{
std::lock_guard<std::mutex> guard(ctrlMutex);
ctrlCurrent.buttons = buttonBits & CTRL_MASK_USER;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not everything goes through the control mapper, such as API events and tilt. I think it'd be much better if this took two parameters, one to clear and one to set.

That way if the API is setting X pressed and the user is not doing anything, it won't incorrectly clear it. Currently, this would incorrectly clear it AFAICT.

-[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.

That's a good point, and will fit well with my WIP code. Will change before merging this.

@hrydgard hrydgard disabled auto-merge March 30, 2023 08:11
@hrydgard hrydgard merged commit 26bf40c into master Mar 30, 2023
@hrydgard hrydgard deleted the refactor-control-callbacks branch March 30, 2023 08:47
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. Input/Controller Input and controller issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants