Skip to content

feat: add full iOS/iPadOS support - #5

Open
Rhystic1 wants to merge 8 commits into
elyosh:mainfrom
Rhystic1:cursor/ios-duo-touch-controls
Open

Rhystic1 wants to merge 8 commits into
elyosh:mainfrom
Rhystic1:cursor/ios-duo-touch-controls

Conversation

@Rhystic1

Copy link
Copy Markdown

These changes add full iPad and iOS support, including full iPhone Duo support with multiple poses.

Touch controls are automatically enabled if no gamepad is detected, and can be manually enabled or disabled in the options menu. Additionally, touch controls are completely customizable.

Still requires users to import the BalanceOfPower folder somewhere in their device to work.

Rhystic1 and others added 8 commits October 22, 2026 11:07
The simulator build keeps the picture and pointer aligned when the device is split, and the on-screen controls can be remapped, faded, or rearranged while the simulation is held.
Installing an IPA on a personal iPhone or iPad requires Developer Mode and an Apple Developer Account.
The iOS template never declared UIDeviceFamily, so iPadOS treated the app
as iPhone-only and ran it in a fixed, centred compatibility window of about
590 x 820 points. Xcode normally writes UIDeviceFamily from
TARGETED_DEVICE_FAMILY; the CMake build does not.

Declare iPhone and iPad device families and set UIRequiresFullScreen. The
scene then fills the iPad display, and the SDL window, Metal drawable and
presentation rect all follow the full-size window.

Caveats:

- UIRequiresFullScreen is deprecated by Apple. A future iPadOS may stop
  honouring it. The iPad build no longer takes part in iPad multitasking.
- The packaging check no longer forbids UIRequiresFullScreen. It requires
  UIDeviceFamily to list iPhone and iPad, and UIRequiresFullScreen to be
  true.

Other changes:

- ios_screen.m keeps the root view on the window bounds when the scene fills
  the display. Duo already fills the display, so it is unaffected.
- Two local SDL patches. sdl-ios27-scene-geometry takes orientation from the
  screen bounds on iOS 27, where statusBarOrientation is a no-op.
  sdl-simulator-metal-family selects the simulator GPU family. Both apply
  after the duo display-scale patch. The SDL stamps change, so existing
  checkouts rebuild SDL once.
- The earlier approach, a minimum and maximum scene size pin with a private
  resize selector, is dropped. It blocked manual resizing and cropped the
  frame.

Tested on a physical iPad. The iPhone Duo was not retested with this commit.
Aeron keeps text input active so desktop fields receive characters. On iPhone that presents the software keyboard at launch, and the roster name box shares field id 0 with the idle state.
The layout holds 32 slots. ESC stays the menu button, and removal is in the command window.
Show the game in one pane and the touch controls in the other in both Duo poses, following the device orientation. Default throttle buttons are now 1/3, 2/3, and Full in place of T+ and T-. The aeron iOS patch adds the available presentation size and a full-display window on iOS.
Sizes are saved apart from positions so an older build can still load the config.
Keep the upstream controller discovery cache, and keep the virtual touch gamepad out of that discovery. Controller mapping keeps ReportAction, Resolve, and DeviceModel.

Co-authored-by: Rhystic1 <Rhystic1@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

2 participants