Skip to content

Commit eb8bdf4

Browse files
committed
mbr: patinfo: handle nohistory argument
1 parent fdffadd commit eb8bdf4

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

mbr/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ OSDMenu MBR supports additional SYSTEM.CNF arguments for `:PATINFO` paths.
8181
- `arg` — custom argument to pass to the ELF file. More than one `arg` lines are supported.
8282
- `skip_argv0` — if set to `1`, the target ELF will only receive argv built from `arg` lines (useful for running POPStarter).
8383
- `titleid` — will use this title ID for the history file and visual game ID
84+
- `nohistory` — if set to `1`, will disable writes to the history file while still showing game ID
8485

8586
### Embedded Neutrino GSM (eGSM)
8687

mbr/src/handlers.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ int handleConfigPath(int argc, char *argv[]) {
220220
// Assumes argv[0] is the partition path
221221
int handleHDDApplication(int argc, char *argv[]) {
222222
char *titleID = NULL;
223-
LoadOptions *lopts = parsePATINFO(argc, argv, &titleID);
223+
int disableHistory = 0;
224+
LoadOptions *lopts = parsePATINFO(argc, argv, &titleID, &disableHistory);
224225
if (!lopts)
225226
return -ENOENT;
226227

@@ -244,7 +245,10 @@ int handleHDDApplication(int argc, char *argv[]) {
244245
}
245246

246247
if (titleID) {
247-
updateLaunchHistory(titleID, (settings.flags & FLAG_APP_GAMEID));
248+
if (disableHistory)
249+
gsDisplayGameID(titleID);
250+
else
251+
updateLaunchHistory(titleID, (settings.flags & FLAG_APP_GAMEID));
248252
}
249253

250254
if (!strcmp(lopts->argv[lopts->argc - 1], "-patinfo"))

0 commit comments

Comments
 (0)