Skip to content

Fill the bars around the picture: blurred copy or a still image - #631

Open
klave7 wants to merge 1 commit into
seedds:mainfrom
klave7:pr/bar-fill
Open

klave7 wants to merge 1 commit into
seedds:mainfrom
klave7:pr/bar-fill

Conversation

@klave7

@klave7 klave7 commented Oct 29, 2026 •

Copy link
Copy Markdown

What and why

A screen that is not 16:9 (the iPhone Duo, an iPad, a phone in some orientations) shows the game's picture with black bars. New iOS setting "Bars around the picture" (DM_BAR_FILL): Black, Blurred picture (default) or Still image. The bars show a dimmed, blurred copy of the picture, or bar_background.jpg, instead of black. The picture is never stretched or cropped.

The fill is drawn in the Metal 4 present pass (present_encode_m4, nvn_mtl.m), so it applies to every game, NVN or Vulkan: the picture's valid rectangle is drawn into a small texture, blurred along x and y, and drawn dimmed over the whole canvas before the sharp picture. It also works through MetalFX (the scaled picture is what is blurred). A screenshot's present keeps black bars. The game view is the whole screen while a fill is on, and the touch mapping follows the picture as the present drew it (mtl_present_aspect).

bar_background.jpg is an image generated with Gemini by the repository's author.

The branch is rebased on main as of 2026-10-30. One conflict with the TV output change in front_ios.m was resolved by keeping both: the game view is the whole screen while a fill is on, and fit_16_9 otherwise, with the TV check unchanged.

Checked

  • Tests: dm/tools/tests/test_launcher_settings.py passes; CI was green on the first commit. The rebased branch was built and run on the iPhone Duo.
  • Games run: Super Mario Galaxy (closed and open, Standard and MetalFX upscaling), Cadence of Hyrule, Good Job!, The Legend of Zelda: Breath of the Wild. Game versions were not recorded. Used for several days of normal play.
  • Devices and OS: iPhone Duo, iOS 27.2. Not tested on other devices.
  • scripts/regress.py check --games: not run. The change is in the Metal 4 present pass, which every game uses; with the setting on Black the picture path is unchanged, and the default (Blurred picture) is what was played.

Docs

  • docs/settings.md, docs/env_switches.tsv and dm/games/settings.tsv list DM_BAR_FILL
  • No chain tool changed
  • No game files, keys or data extracted from a game in the change or the attachments

New iOS setting "Bars around the picture" (DM_BAR_FILL): Black, Blurred picture
(default) or Still image. A screen that is not 16:9 shows the game's picture
with bars; they now show a dimmed, blurred copy of the picture or
bar_background.jpg instead of black. The picture is never stretched or cropped.

The fill is drawn in the Metal 4 present pass (present_encode_m4, nvn_mtl.m), so
it applies to every game, NVN or Vulkan: the picture's valid rectangle is drawn
into a small texture, blurred along x and y, and drawn dimmed over the whole
canvas before the sharp picture. It also works through MetalFX (the scaled
picture is what is blurred). A screenshot's present keeps black bars. The game
view is the whole screen while a fill is on, and the touch mapping follows the
picture as the present drew it (mtl_present_aspect).

bar_background.jpg is an image generated with Gemini by the repository's author.

Tested on an iPhone Duo with Super Mario Galaxy, closed and open, Standard and
MetalFX upscaling; not tested on other devices or games.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) ios The iPhone and iPad app (dm/ios) tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation ios The iPhone and iPad app (dm/ios) nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant