-
Notifications
You must be signed in to change notification settings - Fork 441
Add support for clickable joysticks on game controllers, L3 and R3. #274
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
base: 1.5rc_wip
Are you sure you want to change the base?
Conversation
|
Anything stopping this one from being merged? I have multiple hardware to test this with:
|
|
I'd be excited to see this merged for no other reason than to be able to bind shortcuts to save state management for SNES/n64 |
I find myself wanting to do similar things. But even when using a gamepad that has firmware button remapping and macro support, and the iOS button remapping settings, and Delta's own button mapping settings, the limited overall inputs supported by Delta (L3/R3 being the worst and most glaring) simply makes it really damn hard when you just need one or two extra buttons available in some form or capacity so you can maybe have a quicksave and/or quickload and/or fast-forward bind that doesn't require tediously swapping back and forth to the menu screen. iOS has supported additional game controller inputs like L3 and R3 for years! There's no reason Delta shouldn't support them. |
|
Let's merge this! |
|
@rileytestut Is there a reason this hasn't been merged? Can it be merged? |
|
@CooperCorona my bad for the delay on this. Can you pull in the most recent changes to |
|
Thanks for taking a look @mattaltgear ! I tried pulling in the changes, but I got some merge conflicts. In resolving those, I remembered I branched off of |
|
Ok, in my quest to test this, I can't get it working. It seems something has changed in the interim, and the mapping for L3 and R3 aren't making it to the game controller. The controller settings UI (
I know it was working years ago because I built and ran Delta and used those buttons for quick saves. So something must have changed, but I can't identify where. Something with loading the mappings? |
|
I think I found it: This is a change to |
|
I created #522 to merge this into |
Mark the type contribution you are making:
Description
This pull request, along with pull request 45 in DeltaCore, adds support for clickable joysticks, referred to as L3 and R3. The DeltaCore PR adds the enum cases and value changed handler. This pull request adds the strings that appear controller remapping UI.
References issue #266.
Finally, let me know if I should merge this to a different branch. The only way I could both get the code to compile and use a recent revision of DeltaCore was to clone the 1.5rc_wip branch (cloning
mainordeveloppinned DeltaCore to a sufficiently old version thatMFiGameControllerhad merge conflicts). I can recreate the pull request to a different branch if desired.Testing
List all iOS versions and devices you've tested this change on.
Checklist
General (All PRs)
Experimental Feature-specific
I couldn't find a (simple) way to gate this behind an experimental feature flag. The actual implementation changes are in the DeltaCore PR, which does not have access to
ExperimentalFeatures. There's no way to disable it from Delta itself. I tried following the stack trace throughControllerInputsViewController, but there doesn't seem to be a way to determine what input got pressed or to reject an input. If you want, I can hardcode a type checkgameController(_,didActivate:value:), and if it's.leftThumbstickButtonor.rightThumbstickButton, return early. I believe that would prevent the user from mapping the L3 and R3 buttons. However, it doesn't actually preventMFiGameControllerfrom recognizing them. I believe this satisfies the "When a feature is disabled, it should have no noticeable impact on the rest of the app" guideline.ExperimentalFeaturesstruct annotated with@Feature: see above.@Option's to persist all feature-related data: Not needed.ExperimentalFeatures.shared.[feature].isEnabledruntime check: see above.