Add additional boot options

* Misc.nds and Misc2.nds boot paths added for X and Y buttons.
* Can boot to GBA mode while in filebrowser by pressing X button.
* Example gbaframe.bmp provided.
This commit is contained in:
ApacheThunder 2024-07-11 02:50:03 -05:00
parent e32d1013ac
commit 66327f99d9
3 changed files with 24 additions and 2 deletions

View File

@ -39,6 +39,8 @@
using namespace std;
extern void gbaMode();
struct DirEntry {
string name;
bool isDirectory;
@ -209,5 +211,11 @@ string browseForFile (const vector<string>& extensionList) {
fileOffset = 0;
showDirectoryContents (dirContents, screenOffset);
}
if (pressed & KEY_X) {
gbaMode();
while(1)swiWaitForVBlank();
}
}
}

View File

@ -183,11 +183,25 @@ int main(int argc, char **argv) {
if (!isDSiMode()) { gbaMode(); } else { FileBrowser(); }
} break;
case KEY_B: FileBrowser(); break;
case KEY_X: {
if((access("/Misc.nds", F_OK) == 0)) {
runNdsFile("/Misc.nds", 0, NULL);
} else {
FileBrowser();
}
} break;
case KEY_Y: {
if((access("/Misc2.nds", F_OK) == 0)) {
runNdsFile("/Misc2.nds", 0, NULL);
} else {
FileBrowser();
}
} break;
default: {
if((access("/r4tf.nds", F_OK) == 0)) {
return runNdsFile("/r4tf.nds", 0, NULL);
runNdsFile("/r4tf.nds", 0, NULL);
} else if((access("/boot.nds", F_OK) == 0)) {
return runNdsFile("/boot.nds", 0, NULL);
runNdsFile("/boot.nds", 0, NULL);
} else {
FileBrowser();
}

BIN
gbaframe.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB