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

Input: Make macro chords work properly #12285

Merged
merged 1 commit into from
Mar 1, 2025
Merged

Input: Make macro chords work properly #12285

merged 1 commit into from
Mar 1, 2025

Conversation

Glebux
Copy link
Contributor

@Glebux Glebux commented Feb 8, 2025

Description of Changes

Macros don't trigger if you only press one key of a chord anymore, fixes #8192

InputAxisEventHandler has InputBindingKey as an argument now
InputManager::SplitChord was made public
SetMacroButtonState was changed to check if all triggers of a macro were pressed before proceeding with the input

Rationale behind Changes

To make games that utilize pressure sensitive controls, like MGS3, playable on controllers that don't have it

Suggested Testing Steps

Test this on a windows system, because I don't have one

@github-actions github-actions bot added the PAD label Feb 8, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for submitting a contribution to PCSX2

As this is your first pull request, please be aware of the contributing guidelines.

Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.

Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!

@F0bes
Copy link
Member

F0bes commented Feb 12, 2025

Can you change the commit name to have a proper prefix?
Otherwise the code looks fine to me.

@Glebux
Copy link
Contributor Author

Glebux commented Feb 12, 2025

Can you change the commit name to have a proper prefix? Otherwise the code looks fine to me.

Is this possible to reasonably accomplish using github, or I need to nuke my fork for this?

@F0bes
Copy link
Member

F0bes commented Feb 12, 2025

You want to clone your branch locally and do
git commit --amend and set the commit message again.
You'll have to git push -f afterwards. If you aren't comfortable with that, I can do it for you.

@bslenul
Copy link
Contributor

bslenul commented Feb 12, 2025

Maybe I misunderstood the PR but it doesn't seem to fix #8192 for me, as a test I set Shift+V as Circle and pressing either Shift OR V is sending a Circle input.

edit: forgot to mention but I'm on Windows 10 if it matters.

@princessMagenta
Copy link

princessMagenta commented Mar 1, 2025

tested it on windows 10 and works for me! nice update, mgs3 is even more playable now

@F0bes F0bes merged commit 6542301 into PCSX2:master Mar 1, 2025
12 checks passed
@bslenul
Copy link
Contributor

bslenul commented Mar 1, 2025

pcsx2-record.mp4

Just made a video, I'm binding Circle to Shift & V and you can see that it still acts as OR instead of AND (I show the version at the end just to show that I'm running a version with this PR merged). But again, maybe I misunderstood the PR, idk 🤷 But it doesn't fix #8192 in my case.

@Glebux
Copy link
Contributor Author

Glebux commented Mar 2, 2025

pcsx2-record.mp4

Just made a video, I'm binding Circle to Shift & V and you can see that it still acts as OR instead of AND (I show the version at the end just to show that I'm running a version with this PR merged). But again, maybe I misunderstood the PR, idk 🤷 But it doesn't fix #8192 in my case.

This pull request only implements the fix for macros, not for bindings that are triggered by a combination of multiple keys. Use macros for now until someone makes the fix for everything InputAxisEventHandler related.

@bslenul
Copy link
Contributor

bslenul commented Mar 2, 2025

OK I see, thanks for the clarification 👍

Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Mar 2, 2025
----------------------------------------------------
pcsx2.mk v2.3.188 # Version: Commits on Mar 01, 2025
----------------------------------------------------
- [Input: Make macro chords work properly](PCSX2/pcsx2#12285)

------------------------------------------------------------------------------------
rpcs3.mk 8e6272bfeef72b2dda239c4aced05aa88982c700 # Version: Commits on Mar 01, 2025
------------------------------------------------------------------------------------
Qt: Fix boot failed dialog,

---------------------------------------------------------------------------------------------
theforceengine.mk d3d1c8b0ece821dd50fbfa81f1538b3a6259c318 # Version: Commits on Mar 01, 2025
---------------------------------------------------------------------------------------------
* Removed ENABLE_FORCE_SCRIPT logic - scripting is here to stay.

* Fixed numerous warnings.,

----------------------------------------------------------------------------------------
doomretro.mk 59e6032a4c85189e02fdbd7a39762892d6b5df1f # Version: Commits on Mar 01, 2025
----------------------------------------------------------------------------------------
Update releasenotes.md,

------------------------------------------------------------------------------------------
xash3d-fwgs.mk c76752cc5f92bacdc19b09353f74f659f147d19e # Version: Commits on Mar 01, 2025
------------------------------------------------------------------------------------------
engine: server: validate uuid in protinfo, it's an md5 string,

---------------------------------------------------------------------------------------------------
libretro-squirreljme.mk 396817f035b3f6ba32eee3a745aed46efefd960a # Version: Commits on Mar 01, 2025
---------------------------------------------------------------------------------------------------
Correct aload test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Key combinations doesn't work
4 participants