Skip to content

Commit

Permalink
DS Classic Menu: Add some logging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed May 24, 2024
1 parent 9758ada commit c14a759
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions quickmenu/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "common/fatHeader.h"
#include "common/flashcard.h"
#include "common/inifile.h"
#include "common/logging.h"
#include "common/nds_loader_arm9.h"
#include "common/nds_bootstrap_loader.h"
#include "common/stringtool.h"
Expand Down Expand Up @@ -1267,16 +1268,19 @@ void findPictochatAndDownladPlay() {

if (access("/_nds/pictochat.nds", F_OK) == 0) {
pictochatFound = true;
logPrint("Pictochat found\n");
strncpy(pictochatPath, "/_nds/pictochat.nds", sizeof(pictochatPath));
}

if (isDSiMode() && sys().arm7SCFGLocked()) {
if (ms().consoleModel < 2 && !pictochatFound) {
pictochatFound = true;
pictochatReboot = true;
logPrint("Pictochat found\n");
}
dlplayFound = true;
dlplayReboot = true;
logPrint("DS Download Play found\n");
return;
}

Expand All @@ -1295,6 +1299,7 @@ void findPictochatAndDownladPlay() {
snprintf(pictochatPath, sizeof(pictochatPath), "/title/00030005/484e45%x/content/00000000.app", regions[i]);
if (access(pictochatPath, F_OK) == 0) {
pictochatFound = true;
logPrint("Pictochat found\n");
break;
}
}
Expand All @@ -1310,6 +1315,7 @@ void findPictochatAndDownladPlay() {
remove(pictochatPath);
fcopy(srcPath, pictochatPath); // Copy from NAND
pictochatFound = true;
logPrint("Pictochat found\n");
break;
}
}
Expand All @@ -1318,6 +1324,7 @@ void findPictochatAndDownladPlay() {

if (access("/_nds/dlplay.nds", F_OK) == 0) {
dlplayFound = true;
logPrint("DS Download Play found\n");
strncpy(dlplayPath, "/_nds/dlplay.nds", sizeof(dlplayPath));
return;
}
Expand All @@ -1327,11 +1334,13 @@ void findPictochatAndDownladPlay() {
snprintf(dlplayPath, sizeof(dlplayPath), "/title/00030005/484e44%x/content/00000000.app", regions[i]);
if (access(dlplayPath, F_OK) == 0) {
dlplayFound = true;
logPrint("DS Download Play found\n");
return;
} else if (regions[i] != 0x43 && regions[i] != 0x4B) {
snprintf(dlplayPath, sizeof(dlplayPath), "/title/00030005/484e4441/content/00000001.app");
if (access(dlplayPath, F_OK) == 0) {
dlplayFound = true;
logPrint("DS Download Play found\n");
return;
}
}
Expand All @@ -1347,6 +1356,7 @@ void findPictochatAndDownladPlay() {
remove(dlplayPath);
fcopy(srcPath, dlplayPath); // Copy from NAND
dlplayFound = true;
logPrint("DS Download Play found\n");
return;
} else if (regions[i] != 0x43 && regions[i] != 0x4B) {
snprintf(srcPath, sizeof(srcPath), "nand:/title/00030005/484e4441/content/00000001.app");
Expand All @@ -1355,6 +1365,7 @@ void findPictochatAndDownladPlay() {
remove(dlplayPath);
fcopy(srcPath, dlplayPath); // Copy from NAND
dlplayFound = true;
logPrint("DS Download Play found\n");
return;
}
}
Expand All @@ -1364,6 +1375,7 @@ void findPictochatAndDownladPlay() {
if (ms().consoleModel >= 2) {
dlplayFound = true;
dlplayReboot = true;
logPrint("DS Download Play found\n");
}
}

Expand All @@ -1385,12 +1397,16 @@ int dsClassicMenu(void) {

ms().loadSettings();
bs().loadSettings();
logInit();
//widescreenEffects = (ms().consoleModel >= 2 && ms().wideScreen && access("sd:/luma/sysmodules/TwlBg.cxi", F_OK) == 0);
if (sdFound() && ms().consoleModel >= 2 && !sys().arm7SCFGLocked()) {
CIniFile lumaConfig("sd:/luma/config.ini");
externalFirmsModules = (lumaConfig.GetInt("boot", "enable_external_firm_and_modules", 0) == true);
logPrint((access("sd:/_nds/TWiLightMenu/TwlBg/Widescreen.cxi", F_OK) == 0) && externalFirmsModules ? "Widescreen found\n" : "Widescreen not found\n");
}

logPrint("\n");

findPictochatAndDownladPlay();

if (sdFound() && ms().consoleModel < 2 && ms().launcherApp != -1) {
Expand Down

0 comments on commit c14a759

Please sign in to comment.