Repository navigation
iOS: adapt gameplay to Duo portrait and tabletop poses - #683
jonochocki wants to merge 1 commit into
Conversation
a26df95 to
45ae6aa
Compare
6dff66b to
35d82db
Compare
|
Hi, I have an iPhone Duo and can test this on real hardware if it helps. I can check out the branch, build it locally, and report back on the portrait poses and the half-open tabletop pose. Let me know what specifically you want verified. |
…ure above the controls, the picture can Fill the screen, and a gear opens an in-game menu whose settings take effect at once (#683, #1083) DmLayout.h computes the picture and controls rectangles from the view's bounds, its safe area and UIKit's division region (UIHingeInteraction, iOS 27.1). Landscape keeps the overlay unless the hinge is half open over a horizontal fold; portrait puts a fitted 16:9 picture above the controls. The iPad drops UIRequiresFullScreen and takes all four orientations, so a game runs in a resizable window. Game touches map through the picture rectangle, and a layout change releases held inputs. Picture (DM_PICTURE_FIT): Fit, the default, or Fill, which covers the screen in landscape and crops the edges without stretching. Portrait splits and a TV stay fitted. The 2D/3D button becomes a gear that opens a UIMenu (GameMenu.swift): the controller layout, then Console mode, Picture, Frame-rate counter, Touch feedback and Game rumble, applied while the game runs (front_ios.m dm_setting_live) and saved as the settings screen saves them. The gear stays while a controller hides the other controls. Docking drops the Tap layout. Merged with the TV output: the drawable's scale is set only in DmGameView layoutSubviews, at most maxPixelWidth across, so a layout pass no longer undoes the TV's 1080p cap; while the TV shows the picture the phone is all controls. Rumble: vibration handles are given with rumble off too, as on a Switch whose vibration is off, so turning it on during play works in a game that asked once. Checked: iOS compile check and build_smoke; the Duo harness, 33 Simulator tests passing (1 skipped, iOS 27.1 only); t_hid, t_haptics; test_docs, test_launcher_settings, test_launcher_storage, test_orientation_policy. Not tested on a device. Co-authored-by: Jon Ochocki <[email protected]> Co-authored-by: v0lumehi <[email protected]>
|
Landed in e2fadf2 with you as co-author, together with #1083. Thank you for the layout work and the harness. Changes from the PR while merging it onto current main:
Not yet tested on a device with this repository's build. @mbndrock, your Duo offer would help: portrait both ways, the half-open tabletop pose, and the gear menu in each. A |
Drops three patches that landed upstream: Duo layout (0061, seedds/nxnative#683), picture fit (0063, LNPANDY#1083) and the Home button quit (0064, LNPANDY#1084). Refreshes the rest for the new pin. Adds the launch.set.DM_UPSCALER texts in all six languages.
|
Tested on an iPhone Duo (iOS 27.2) from 4e0333a with Rhythm Heaven Groove: unfolded, the picture sits above the controls in portrait and the layout follows all four orientations, upside down included. Half folded in portrait it looks the same as unfolded, which matches dm_layout (portrait splits the same way open or half open). |
… MetalFX upscalers (chain from upstream) Conflicts: the iPhone Duo files take upstream's merged version (seedds#683, seedds#1083); the TV mirror setting (e41f09b) is applied again on upstream's front end; Pokopia's note keeps this branch's iPhone and 1.0.4 facts with upstream's depth_mode, archive and shader-build findings; the games table and gallery keep both sides' games; the TiledDownsample entry Ikaruga's note links to is kept; symptoms.md and game-patches.md are regenerated.
|
Tested the Duo layout build on hardware, following up on the tag. Setup: iPhone Duo, main at 88c7e03, Pokemon Brilliant Diamond (0100000011D90000), picture Fill, MetalFX upscale. One session of about 160 seconds at a steady 60 fps (frame p50 about 16.7 ms). I ran the poses you listed: portrait both ways, the half-open tabletop pose, flat open, and the gear menu in each. Everything looked right on screen. Picture and controls stayed on their own sides of the hinge in every pose, controls landed where expected, and the menu sat correctly. The "front end: layout" lines from the session. The front end moved between overlay and split as the pose changed, at both hinge states: One observation: every split line has the same geometry, picture at the top and controls at the bottom. The log does not show a flipped split for portrait in the other direction. Happy to send the full log.txt if you want it. |
…ure above the controls, the picture can Fill the screen, and a gear opens an in-game menu whose settings take effect at once (seedds#683, seedds#1083) DmLayout.h computes the picture and controls rectangles from the view's bounds, its safe area and UIKit's division region (UIHingeInteraction, iOS 27.1). Landscape keeps the overlay unless the hinge is half open over a horizontal fold; portrait puts a fitted 16:9 picture above the controls. The iPad drops UIRequiresFullScreen and takes all four orientations, so a game runs in a resizable window. Game touches map through the picture rectangle, and a layout change releases held inputs. Picture (DM_PICTURE_FIT): Fit, the default, or Fill, which covers the screen in landscape and crops the edges without stretching. Portrait splits and a TV stay fitted. The 2D/3D button becomes a gear that opens a UIMenu (GameMenu.swift): the controller layout, then Console mode, Picture, Frame-rate counter, Touch feedback and Game rumble, applied while the game runs (front_ios.m dm_setting_live) and saved as the settings screen saves them. The gear stays while a controller hides the other controls. Docking drops the Tap layout. Merged with the TV output: the drawable's scale is set only in DmGameView layoutSubviews, at most maxPixelWidth across, so a layout pass no longer undoes the TV's 1080p cap; while the TV shows the picture the phone is all controls. Rumble: vibration handles are given with rumble off too, as on a Switch whose vibration is off, so turning it on during play works in a game that asked once. Checked: iOS compile check and build_smoke; the Duo harness, 33 Simulator tests passing (1 skipped, iOS 27.1 only); t_hid, t_haptics; test_docs, test_launcher_settings, test_launcher_storage, test_orientation_policy. Not tested on a device. Co-authored-by: Jon Ochocki <[email protected]> Co-authored-by: v0lumehi <[email protected]>
…nt, and layout Upstream-Status: pending [builds on seedds#683] Reason: Let players resize and reposition touch controls with editor and gameplay geometry parity Issue: LNPANDY/NX2Apple#347
What and why
Add native iPhone Duo gameplay layouts. Portrait places the aspect-fitted 16:9 game picture above the virtual controls; a partially open horizontal hinge uses UIKit’s division region for tabletop play. Landscape retains the existing overlay when no tabletop division applies.
UIHingeInteractionand reserved regions on iOS 27.1+, including inactive division boundaries. Other SDKs/OS versions retain the geometry fallback.UIRequiresFullScreen;UILaunchScreen: {}replaces the empty storyboard entry. The existing launcher gets an orientation-capable hosting controller; its design and settings are unchanged.This is the Duo-only portion of the previously combined contribution, split at the maintainer’s request. It includes no AirPlay scene, launcher redesign, artwork fetching/bundling, accent extraction or desktop-builder changes. The AirPlay follow-up is prepared separately; the launcher redesign is deferred for discussion with NX2Apple’s shell work (LNPANDY/NX2Apple#226 / LNPANDY/NX2Apple#144).
Checked
Rebased onto current main. The fork retains the
ee6648cbupstream pin, existing patches0030and0031, and Duo patch0033. The patch and commits use the contributor’s own Git identity. The redundantg_rootassignment is removed; upstream’s Nintendo-controller mapping is retained.(0.5, 0.5)after resizing and rotation.The iPad checks use synthetic Metal frames through the production presentation and input code. Full-game testing on a physical iPad and game-performance measurements under resizing remain outstanding. The existing launcher’s two-column layout wraps long titles heavily in narrow windows; this PR does not redesign it.
Earlier device-SDK compile/link smoke checks passed with synthetic game modules and resources; those checks and physical Duo 1.3.19 acceptance predate this rebase. No shader, game-profile or guest-code changes are included. Existing screenshots below are from the previously approved physical Duo build; no new 1.3.19 screenshots are claimed.
Screenshots
Owner-provided physical Duo gameplay; the launcher and external-display screenshots are intentionally excluded.
Inner display: portrait game above controls
Inner display: landscape overlay
Outer display: landscape overlay
Docs
docs/reference/rendering.md; the symptom index was regenerated.Companion forwarded patch: LNPANDY/NX2Apple#230. Reversible UIKit/input change; no app-identity or save-data migration.