Skip to content

The shell's own settings: game data, cloud saves, language, performance HUD - #400

Merged
LNPANDY merged 2 commits into
mainfrom
feat/shell-settings
Nov 1, 2026
Merged

LNPANDY merged 2 commits into
mainfrom
feat/shell-settings

Conversation

@LNPANDY

@LNPANDY LNPANDY commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Fix or feature

  • Feature

What and why

The shell had only per-game settings. The owner testing several games asked for a shell-level page — the library-wide choices made once:

  • Game data folder: every new game looks here first for games/<title ID>/; each game's own bookmark still wins, and the fallback to the app folder stays. DataLocator.locate gained the shell's folder as its middle source (picked > shell > app).
  • Cloud-saves folder: chosen once, all games share it by default.
  • Interface language: follow the device, 中文, or English (the shell's Chinese shipped in The data transfer speaks for itself, and the shell speaks Chinese #396).
  • Default performance HUD: applied by EngineLaunchPlan only when the game's own settings left DM_METAL_HUD unset.

The priority everywhere is game > shell > built-in (ShellSettingsStore.effective, tested), so every per-game override keeps working. The view reuses the settings components, and the pickers ride the same security-scoped bookmarks as a game's own picks.

Checked

  • Tests: new ShellSettingsStoreTests (the priority chain); frontend-ios builds clean and its tests pass.
  • Visual QA: the view is new; it rides the existing card/row styling.
  • Run on a device or Mac: built on this Mac; needs a device pass to verify the pickers' security scope through the shared page and the HUD default on a game with no own choice.

…#398)

A game lived in the shell only as long as its build folder existed: dropMissing dropped it once the framework was gone, and the recovery was a full rebuild. The build now mirrors each framework into the shell folder (a hard link on one volume, a copy across), dropMissing falls back to the mirror, and the next install re-embeds from it — a deleted build folder no longer removes a game. Settings → Build tools gains the cache row the owner asked for: the name, the folder path, an Open folder button, and a caption saying what lives there and what deleting it costs. Hard-link and drop-fallback behaviours are tested (ShellMirrorTests).
…efault performance HUD

The shell had only per-game settings. A shell-level page now holds the library-wide choices: the game-data folder every new game looks in first (each game's own bookmark still wins), the cloud-saves folder all games share by default, the interface language (follow the device, Chinese, English), and the default performance HUD a game inherits when its own row leaves it unset. The priority is game > shell > built-in everywhere (ShellSettingsStore, tested). The data locator gained the shell's folder as its middle source, and the launch plan applies the HUD default only when the game's own settings left it unset. The view reuses the settings components, and the pickers ride the same security-scoped bookmarks as a game's own picks.
@github-actions github-actions Bot added launcher The NX2Apple launcher app ios iPhone or iPad windows Windows (the Qt front end) labels Nov 1, 2026
@LNPANDY
LNPANDY merged commit 7293d52 into main Nov 1, 2026
12 checks passed
@v0lumehi

v0lumehi commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

@LNPANDY I reviewed the shell settings page. It is in rc8, and on a device none of its four rows changes anything yet. I checked this on main:

  • The two folder buttons call actions.onPickShellData and actions.onPickShellCloud. Both default to {} in ShellInputs, and no caller sets them. The buttons do nothing.
  • The interface language is stored and never read.
  • The cloud-saves bookmark is stored and never read.
  • The HUD default is never passed. EngineLaunchPlan.make(shellPerformanceHUD:) defaults to nil, and no caller passes it. ShellSettingsStore.effective is only called by its test.
  • The game-data folder is the only row ShellHostModel reads, and it cannot be set because of the first point.
  • All texts are Chinese. zh() returns its input, and there is no Localizable entry, so an English device shows Chinese.

Two things in the code:

  • globalData() creates and removes a UserDefaults domain for every game on every refresh. BookmarkStore takes a key, so BookmarkStore(defaults: <shell suite>, key: ShellSettingsStore.dataFolderKey) reads the bookmark directly and keeps the refresh of a stale bookmark.
  • A game found through the shell folder reports source = .picked, so its settings say the player picked that folder for this game.

0.8.0 should not ship a page whose controls do nothing. I see two ways. Either we wire up the four rows and the translations before the final, or the button that opens the page is hidden until they work. Which do you prefer? #394 still names rc5. I will update it once we know which candidate becomes 0.8.0.

nobz226 pushed a commit to nobz226/NX2Apple that referenced this pull request Nov 1, 2026
…ayout

The shell settings page from LNPANDY#400 was only partly wired. I fix every point from my review on it.

The gear sits at the top right next to the controller chip in all layouts, not only in the empty library. The page is now a panel with a title and a Done button. B closes it.

The page uses the same components as the per-game settings. Its texts exist in English and Chinese. The language choice changes the shell texts.

The two folder rows open a folder picker and keep the bookmark. A game without a cloud-saves folder uses the shell one. A game found through the shell data folder has the new source `.shell`.

The shell performance overlay choice is a fallback in the game settings. A game that chose for itself keeps its choice.
@v0lumehi
v0lumehi deleted the feat/shell-settings branch November 2, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ios iPhone or iPad launcher The NX2Apple launcher app windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants