Skip to content

Conversation

@CooperCorona
Copy link

(This PR obsoletes #274, which merged into a main branch. I couldn't fix it without creating a new PR altogether).

Mark the type contribution you are making:

  • Experimental feature (new functionality that can be selectively enabled/disabled)
  • Bug fix (non-breaking change which fixes an issue)

Description

This pull request, along with pull request 56 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.

Testing

List all iOS versions and devices you've tested this change on.

  • iPhone 15 Pro, iOS 26.0.1
  • iPad Mini (6th gen), iPadOS 18.7.2

Checklist

General (All PRs)

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas: there were only straightforward changes.
  • My changes generate no new warnings: I spot checked the list of warnings, and I do not believe any are related to this change, or to the change in DeltaCore.
  • [] I've tested my changes with different device + OS version configurations: I only have one physical device. Does testing on simulators count?

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 through ControllerInputsViewController, 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 check gameController(_,didActivate:value:), and if it's .leftThumbstickButton or .rightThumbstickButton, return early. I believe that would prevent the user from mapping the L3 and R3 buttons. However, it doesn't actually prevent MFiGameController from 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.

  • Added property to ExperimentalFeatures struct annotated with @Feature: see above.
  • Uses @Option's to persist all feature-related data: Not needed.
  • Locked all behavior changes behind ExperimentalFeatures.shared.[feature].isEnabled runtime check: see above.
  • Isolates changes to separate files as much as possible (e.g. via Swift extensions): This wasn't possible without compilation errors.

@CooperCorona
Copy link
Author

CooperCorona commented Nov 28, 2025

Followup question: do I need to update the DeltaCore submodule? Do I need to do that after DeltaCore PR 56 goes in?

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.

1 participant