Skip to content

iPhone Duo: screen-shaped resolutions, fold re-frame, working bar buttons - #624

Open
leewsimpson wants to merge 2 commits into
willfaust:mainfrom
leewsimpson:duo-support
Open

leewsimpson wants to merge 2 commits into
willfaust:mainfrom
leewsimpson:duo-support

Conversation

@leewsimpson

Copy link
Copy Markdown

Adds native support for the iPhone Duo (iPhone19,4), a foldable with an inner 951x669 pt screen and an outer 466x678 pt one. Built with the iOS 27 SDK, Madeira runs natively on it rather than letterboxed. On the Duo, the 0.2.0 IPA (iOS 26.5 SDK) still runs letterboxed.

Changes

  • Resolution follows the screen. The resolution choices and the default come from the screen the game is on. A device that has shown two screen shapes stores a "follow the screen" token for new entries and resolves it at launch: 1152x808 on the inner screen, 1152x792 on the outer. Existing entries with a default size are converted once. A size picked on purpose stays fixed.
  • Fold re-frame. A fold or unfold that keeps the orientation now re-lays out the game layer and the touch controls (DisplayGeometry.changed). Before, only a rotation did that.
  • [display-geometry] log lines at launch and on every scene geometry or size-class change, so a log shows which screen a session ran on.
  • Toolbar and tab bar work on the Duo. iOS draws the toolbar buttons and the floating tab bar in an 84 pt column inside the right safe-area inset. That column is outside the safe-area-sized view that .handlesGameControllerEvents wraps the root in, so taps there reached nothing: the buttons highlighted but never acted. On the Duo only (FoldableFillsWindow, keyed on the model code), the root now ignores the safe area outside that modifier. The navigation stack inside keeps the safe area through UIKit.

Other devices

Other iPhones and iPads are unchanged. check-duo-display compares the choices, defaults, 720-line sizes and MetalFX values for current iPhones and iPads with a golden table recorded before this change. The full-window change applies only on the Duo, because it is the only device it was tested on.

Testing

  • On an iPhone Duo (iOS 27.2.1):
    • the library toolbar (filter, +) and tab bar (Library, Settings) on both screens;
    • folding and unfolding mid-game: the picture and touch controls follow the screen.
  • Host checks:
    • check-duo-display (new), with the Duo screens as measured on the device;
    • check-frontend, check-control-presets, check-library-zoom and check-game-recommendations gain Duo cases;
    • check-library-sections, check-pointer-geometry and check-doc-links still pass.

No other device was available for a smoke test.

🤖 Generated with Claude Code

leewsimpson and others added 2 commits November 15, 2026 23:23
… working bar buttons

On the iPhone Duo (iPhone19,4), a foldable with an inner 951x669 pt screen and
an outer 466x678 pt one, Madeira built with the iOS 27 SDK runs natively and:

- Resolution choices follow the screen the game is on. A device that has shown
  two screen shapes stores a "follow the screen" token for new entries and
  resolves it at launch (inner default 1152x808, outer 1152x792). Single-screen
  iPhones and iPads keep their values: check-duo-display compares them with a
  golden table recorded before this change.
- A fold or unfold that keeps the orientation re-lays out the game layer and
  the touch controls (DisplayGeometry.changed), not only a rotation.
- [display-geometry] log lines at launch and on every scene geometry or size
  class change.
- The toolbar and tab-bar buttons work. On the Duo, iOS draws them in an 84 pt
  column inside the right safe-area inset, outside the safe-area-sized view
  that .handlesGameControllerEvents wraps the root in, so taps there reached
  nothing. The root now ignores the safe area outside that modifier; the
  navigation stack inside keeps it through UIKit.

Tested on an iPhone Duo (iOS 27.2.1): library toolbar and tab bar on both
screens. Host checks: check-duo-display (new), check-frontend,
check-control-presets, check-library-zoom, check-game-recommendations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lee Simpson <leewsimpson@gmail.com>
The root ignores the safe area only on the iPhone Duo (iPhone19,4, or a
simulator of it), the one device where the bar buttons were out of reach and
the only one the change was tested on. Other iPhones and iPads keep their
layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lee Simpson <leewsimpson@gmail.com>
@Spidy123222

Copy link
Copy Markdown

Can we get examples (videos, images) of what was achieved since the iPhone Duo is still relatively new and I am unaware of anyone that has one. Maybe even another person to try this pull request out?

@ionagamed

Copy link
Copy Markdown

Got a quick demo right here: https://streamable.com/8brk6c (good for 2 days, no idea how to best upload videos).

Folding the device stops the recording for some reason, so “trust me bro” it works fine. I didn’t do substantial testing though, just a quick look. I’ll continue daily driving the build from this PR for the time being, will check back in a couple days.

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.

3 participants