mirror of
https://github.com/ApacheThunder/r4bootstrap.git
synced 2025-06-19 03:35:41 -04:00
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:
parent
e32d1013ac
commit
66327f99d9
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
BIN
gbaframe.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 144 KiB |
Loading…
Reference in New Issue
Block a user