Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Docs: the shell's switches in the env switch table

v0lumehi30d5d816b47e
diff --git a/patches/0038-dm-framework-env-switch-row.patch b/patches/0038-dm-framework-env-switch-row.patch
index ae7a797b..3c56d489 100644
--- a/patches/0038-dm-framework-env-switch-row.patch
+++ b/patches/0038-dm-framework-env-switch-row.patch
@@ -11,20 +11,35 @@ what `=1` does and that the default keeps the in-executable build.
Upstream-Status: fork-only (waits for the runtime profile, seedds/nxnative#492)
Reason: opt-in game framework for the launcher (route C M1): it carries profile.tsv and sets DM_PROFILE, which exist only with the runtime-profile patch (seedds/nxnative#492 is still a design note), so it goes upstream after that
Issue: LNPANDY/NX2Apple#144
-
---
- docs/env_switches.tsv | 1 +
- 1 file changed, 1 insertion(+)
+ docs/env_switches.tsv | 7 +++++++
+ 1 file changed, 7 insertions(+)
diff --git a/docs/env_switches.tsv b/docs/env_switches.tsv
-index 6993f8dc..0645b4db 100644
+index 6993f8dc..aee6d49a 100644
--- a/docs/env_switches.tsv
+++ b/docs/env_switches.tsv
-@@ -37,6 +37,7 @@ DM_FORCE_STRICT diagnostic `=1` makes the loader fail on forced-hook entries no
+@@ -34,9 +34,12 @@ DM_FD_LOG diagnostic `=<seconds>` logs, every that many seconds, the number and
+ DM_FIXED_TIME switch `=<seconds>`: the user clock always returns that time and the host time zone is pinned to UTC, for deterministic comparison
+ DM_FONT_DIR path Folder of the shared-font stand-ins (`standard.ttf`, `nintendo_ext.ttf` with the button icons); the app, the Mac launcher and the NSP script set it
+ DM_FORCE_STRICT diagnostic `=1` makes the loader fail on forced-hook entries no module references, instead of only noting them (for checking a mistyped list)
++DM_FORK_PATCHES path the fork patches a build carries, comma separated (build_ipa.sh and build_shell.sh read dm/fork_patches.txt into it): `DMForkPatches` in the app's Info.plist and the first log line
DM_FPS switch `30` or `60` pins the frame rate the display link and frame pacing aim for; otherwise it follows the game's present interval (60, or 30 when the game asks for 30)
DM_FPS_HOLD player `on` / `off` overrides the profile's `fps_hold`: whether late frames may raise the hold above the frame cap's vsyncs (on by default)
DM_FPS_TARGET player Frame-rate cap: `30` or `60`, or `0` for the game's own limit; overrides the profile's `fps_target`
+DM_FRAMEWORK switch `=1` (route C M1) compiles the game's modules into `DmIOS.app/Frameworks/DmGame.framework` instead of the executable, which `dlopen`s it at launch (`dm/ios/project-framework.yml`; the NSP script's `--framework` sets it); the default 0 keeps the usual in-executable build
++DM_FRAMEWORK_ONLY path `=<folder>` (route C shell) makes build_ipa.sh build only the game's framework, `<folder>/DmGame<title ID>.framework` with its shader libraries, pipeline archive, settings list and icon, unsigned, for build_shell.sh (the NSP script's `--shell-framework` sets it)
DM_FS diagnostic When set, logs file opens, paths not found or not mounted, and a read summary every 64 MiB or 1000 reads
DM_FSLOG diagnostic `=<file>` writes one TSV line per ReadFile: seconds since boot, guest path, offset, length and guest buffer address
DM_FSLOG_HASH diagnostic With `DM_FSLOG`, adds a column with the FNV-1a 64 hash of the bytes read
+@@ -273,6 +276,10 @@ DM_SF_TRACE diagnostic `=1` logs every request on the game's own HIPC client ses
+ DM_SHAKE_G switch `=<G>`: on iOS, the acceleration beyond gravity above which a flick of the phone shakes the controller's six-axis sensor (default 1.5)
+ DM_SHARED_FONT path Font file served for every shared-font type except the Nintendo extension (default `$DM_FONT_DIR/standard.ttf`, then macOS's Arial Unicode)
+ DM_SHARED_FONT_EXT path Font file served for shared-font type 5, the Nintendo extension with the button icons (default `$DM_FONT_DIR/nintendo_ext.ttf`, made by `make_ext_font.py`)
++DM_SHELL_FRAMEWORKS path the game frameworks build_shell.sh embeds in the shell app, one folder per line
++DM_SHELL_NAME switch the shell app's name under its icon (build_shell.sh, default NX2Apple)
++DM_SHELL_PACKAGE path the frontend-ios Swift package build_shell.sh links into the shell app (default: frontend-ios in this checkout)
++DM_SHELL_PLAY diagnostic `=<title ID>` in the shell app's launch environment (devicectl) starts that game as Play in its library would, for a test run, and a launch from the home screen never has it
+ DM_SHOW_FPS player `1` shows the frame-rate counter on the iPhone (frames put on screen per second, top left); at IPA build it sets `DMShowFPS` in `Info.plist`, which `Documents/env.txt` overrides
+ DM_SLOWFRAME diagnostic `=1` writes the per-frame timing breakdown to the log only for dropped frames (kept in a ring of the last 16 frames, judged 8 frames late)
+ DM_SPIN switch `0` makes the rewriter's spin gate return at once, so guest poll loops spin with no sleep; the gate stays (on by default)