The NX build enables SNX_BUILD_GUI by default. Disable it with
-DSNX_BUILD_GUI=OFF. Tools-only builds do not enable the GUI.
The GUI itself needs only SDL3, not Vulkan or FFmpeg. The driver binaries can be
built separately and installed beside it or made available on PATH.
To build it alongside the NX runtime (which supports -H for no-window runs):
cmake -S . -B build/gui -DSNX_DEPLOY=OFF -DSNX_BUILD_GUI=ON
cmake --build build/gui
ctest --test-dir build/gui -R '^gui_' --output-on-failure
For just the GUI and Linux runtime, use -DSNX_BUILD_NX=OFF -DSNX_BUILD_GUI=ON: the launcher is
then scarletnx-gui, a program of its own, which looks for scarletnx as it does for the other drivers.
Tools-only builds cannot enable the GUI.
Supported host platforms are Linux, FreeBSD, Windows (llvm-mingw) and Android (dist/android).
SDL3 handles window creation, keyboard/mouse input, rendering, clipboard and drag-and-drop
on every host. The platform-specific code only handles child processes and resource
accounting. See Build for SDL3's desktop dependencies.
The menu's list, Games' and its grid, the Settings', the setup's Appearance, the choices of the questions and the
setup, the boxes of users, of a game's add-ons and of Games' View, and the OK of a box of files are scenes of
src/gui/ui.txt, which tools/uigen turns into gui/ui.h and
gui/ui.c as the GUI builds (the format is in tools/uigen/uigen.c's first comment): their layout computed at build
time, the drawing and callbacks main.c's. The screens' boxes (the head, the tips, the list, the side box, the Status
box and the foot) are its frames Screen and Wide, laid out as they are drawn, from what main.c measures. uigen tests the generator's output and refusals, gui_ui runs what it
makes of tests/ui_test.txt.
The tests cover menu transitions, bounded console scrolling, split UTF-8/ANSI
sequences, path parsing, argument quoting, inherited grandchild output, resource
accounting and process-tree cleanup. Browser tests cover filtering, missing/empty
directories, pagination, resizing, Back/ESC, launching selected files and R's recompile.
Key setup tests cover installation, replacement, invalid drops, failed writes,
self-copy safety, cancellation, and the bright-red overwrite warning. Setup tests (gui_setup) go through every
page of a first start in a home of their own and check what each writes (a portable copy, the language, the folders,
the keys, the first user) and refuses, users.ini kept or overwritten, the fixed uid kept for its saves, a notice
alone after an update, --no-setup, and the question where options-dialog puts it.
Pixel order tests (gui_pixel_order) draw every database Mii's picture, square and round, Wimsy's, a 3DS icon and
the covers on the renderer and check each shows its source's colours, which a big-endian host's byte order swaps
where a picture's bytes and its format disagree.
Language tests cover a catalog's search in either byte order, catalogs cut or pointing out of themselves, the language
Auto picks from the system's locales, English where a language has none, the Language row and app.ini's key, and
the script's refusals; they use a language of their own, tests/po/xx.po. Glyph tests cover the Latin, the titles'
and the wide letters' lookup and rows against Unifont's, each way the menu draws a line with them (a wide one's two
columns in widths, cuts, wraps, slides, a foot's keys and typed text), more wide letters on a row than the texture's
slots, UTF-8 read with a ? for each byte no character starts, and the script that keeps them.
Settings tests cover the runtime's list read into rows, picks, the options each combination
passes, and the screens of its groups and App; menu tests cover mouse hover versus explicit
activation, the menu without the games and Games with its recent games' show-more row and P,
yellow/pink highlighting and the tips. Theme tests cover the built-ins, a theme.ini over its base
(unreadable values and unknown keys included), the themes/ folders listed, the
compiling and loading screens, and the YoRHa bars and band in the real renderer. Step
tests cover each driver and runner line, the other lines kept under their step, lines
split across reads, the progress and how a run ends; the renderer tests check the menu
fading out into a run, the loading screen, its typing, detailed and collapsed steps,
texture and fades at a fixed clock.
SDL tests use the dummy video driver and the
software renderer, exercising the real font and event handlers without a display.
The font's provenance and public-domain notice are in
src/gui/FONT-NOTICE.txt.
Made from docs/user/gui.md at 69237645142c. GPL-3.0-or-later.