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 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-10 20:33:34 +02:00
1 parent 24a2f6110d
commit 80e346d802
1 file changed
+6 -1
+6 -1
View File
@@ -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