Repository navigation
iOS shell: Picture row, Fit or Fill for screens that are not 16:9 - #575
Merged
Merged
Conversation
Patch 0063 adds DM_PICTURE_FIT to the engine's settings list (platform:ios) and lets the iOS front end scale the 16:9 picture to cover the screen in landscape. The shell shows it as a per-game segmented choice in the Game section with a note on what Fill crops. Texts in all six languages. A segmented row now wraps its label to the card, so a long note no longer pushes a two-option choice into the compact list row.
1 task done
4 of 6 tasks
v0lumehi
added a commit
that referenced
this pull request
Nov 3, 2026
5 of 6 tasks
victorwads
pushed a commit
to victorwads/NX2Apple
that referenced
this pull request
Nov 3, 2026
LNPANDY#575 took 0063 and LNPANDY#579 reserves 0064. The geometry test also checks that the picture Fill (0063) leaves the controls where they are.
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix or feature
Feature from outside: not from outside. The issue is #545 in milestone v1.1.0.
What and why
Closes #545.
Most iPhones are wider than 16:9 and an iPad is 4:3. The game is always the largest 16:9 rectangle with black bars. @digitalkid56 asked for a picture that fills the screen.
Each game's settings now have a Picture row in the Game section: Fit or Fill.
How it works:
0063addsDM_PICTURE_FIT(fitorfill) todm/games/settings.tsvas aplatform:ioschoice, so it reaches every iOS game'slauncher.json. The shell shows it like the other per-game rows, keeps it in the game's own suite and passes it with the otherDM_*values at launch. The shell needed no code for that, only the texts.front_ios.mreadsDM_PICTURE_FITat game start.DmLayout.hhas the pure functions:dm_aspect_fill(the smallest centered 16:9 rectangle that covers the view),dm_layout_pictureanddm_game_touch_point.pushGameusesdm_game_touch_point), so a touch on the visible part lands where that part of the picture is.One view fix comes with it. A segmented choice used
ViewThatFitsover the label and the segments together. A long note made the label too wide, so a two-option row fell back to the compact list row. Upscaling in German already did that on main (see the before image). Now only the segments decide, and the label wraps to the card.Texts:
launch.set.DM_PICTURE_FIT, its.noteandlaunch.opt.DM_PICTURE_FIT.fit/.fillin all six files, asDM_SHOW_FPSdoes (the Mac'sLaunchOptionsTestswants alaunch.*entry for every row ofsettings.tsv). English and Chinese are mine. German, French, Swedish and Italian are machine-translated, please check them.tools/l10n_shell_catalogs.py --checkpasses andtools/tests/launcher_texts.txtis regenerated.Upstream: the same change is seedds/nxnative#1083. It builds on seedds/nxnative#683 (the Duo layouts, our 0061), so it is stacked on that branch. The fork's patch also adds a missing
front_ios_device_checkstub to the Duo harness, so the harness links again at our pin. Upstream's branch of #683 does not need it.Checked
swift test --package-path frontend-ios(newPictureFitTests: the row, its default, the per-game suite,DM_PICTURE_FIT=fillin the launch environment and the plan. NewPictureFitRowTests: the texts in every shell language and the segmented choice).python3 -m unittest discover tools/tests.python3 tools/engine.py check. Inengine/:dm/tools/tests/test_launcher_settings.pyandtest_player_env.py. The pre-push hook ran the Mac launcher tests.test_env_switches.pyfails on main too (DM_FONT_CACHE and others), the new row adds nothing to it.engine/dm/ios/tests/duo) in the iOS 27 Simulator: 28 tests pass and 1 is skipped (the virtual controller case), among them three new ones for the cover rectangle on iPhone, iPad and 16:9 sizes, the portrait and tabletop splits that stay fitted, and touches on the cropped picture.PictureFitCaptureTestswithNX_SHELL_CAPTURE_DIR, in English, German and Chinese.Screenshots
The Game section of a game's settings.
Before, English:
After, English, Fit and Fill:
Before, German (Upscaling already fell back to the list row):
After, German, Fill:
After, Chinese, Fit:
Scope
dm/,scripts/,docs/,ref/) is added to the repository: a change there is a patch inpatches/(a commit inengine/, thentools/engine.py export, andtools/engine.py checkpasses), with itsUpstream-Statusforwarded seedds/nxnative#1083