From 80e346d802ea12bbe2295ae4d26d23c17c2e10e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 10 Oct 2026 19:50:28 +0200 Subject: [PATCH] Headless: Honor --nand ApplyToConfig() set nandRootDirectory from it, but headless then reset it to the memstick's PSP/NAND unconditionally, so --nand did nothing there. Co-Authored-By: Claude Opus 5.5 --- headless/Headless.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 76ccdc3c59..73d7cf5d76 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -1104,7 +1104,12 @@ int main(int argc, const char* argv[]) { g_Config.memStickDirectory = Path(std::string(getenv("HOME"))) / ".ppsspp"; #endif } - g_Config.nandRootDirectory = GetSysDirectory(DIRECTORY_NAND); + // The memstick's NAND, unless --nand says otherwise. + if (cmdLineOptions.nand.has_value()) { + g_Config.nandRootDirectory = Path(cmdLineOptions.nand.value()); + } else { + g_Config.nandRootDirectory = GetSysDirectory(DIRECTORY_NAND); + } coreParameter.nandRoot = g_Config.nandRootDirectory; // Most discs carry the firmware they shipped with - this option installs it, if one