From b04a78d48642c721d02c0f677cff11e0cc351105 Mon Sep 17 00:00:00 2001 From: emu_kidid Date: Sat, 7 Dec 2019 08:34:04 +1030 Subject: [PATCH] - Don't show select_alt_dol when the selection is just the main DOL and the apploader trailer --- cube/swiss/source/swiss.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cube/swiss/source/swiss.c b/cube/swiss/source/swiss.c index ae33c2aa..92390b1e 100644 --- a/cube/swiss/source/swiss.c +++ b/cube/swiss/source/swiss.c @@ -560,8 +560,13 @@ ExecutableFile* select_alt_dol(ExecutableFile *filesToPatch) { int i = 0, j = 0, max = 0, idx = 0, page = 4; for(i = 0; i < 64; i++) if(filesToPatch[i].offset == 0) break; sortDols(filesToPatch, i); // Sort DOL to the top - for(i = 0; i < 64; i++) if(filesToPatch[i].offset == 0 || filesToPatch[i].type != PATCH_DOL) break; - int num_files = i; + int num_files = 0; + for(i = 0; i < 64; i++) { + if(filesToPatch[i].offset != 0 && filesToPatch[i].type == PATCH_DOL + && !(!strcmp(filesToPatch[i].name, "Main DOL") || !strcmp(filesToPatch[i].name, "Apploader Trailer"))) { + num_files++; + } + } if(num_files < 2) return 0; int fileListBase = 175;