Skip to content

Commit cae6e0c

Browse files
committed
Show message if being used on a flashcard
1 parent cddd8d7 commit cae6e0c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

arm9/source/main.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ static inline int dbg_printf( const char* format, ... )
5757
return ret;
5858
}
5959

60+
//---------------------------------------------------------------------------------
61+
void stop (void) {
62+
//---------------------------------------------------------------------------------
63+
while (1) {
64+
swiWaitForVBlank();
65+
}
66+
}
67+
6068
//---------------------------------------------------------------------------------
6169
void dopause() {
6270
//---------------------------------------------------------------------------------
@@ -197,6 +205,15 @@ int main( int argc, char **argv) {
197205

198206
if (fatInitDefault()) {
199207
nocashMessage("fatInitDefault");
208+
209+
if (access("fat:/", F_OK) == 0) {
210+
consoleDemoInit();
211+
printf("This edition of nds-bootstrap\n");
212+
printf("can only be used on the\n");
213+
printf("SD card.\n");
214+
stop();
215+
}
216+
200217
CIniFile bootstrapini( "sd:/_nds/nds-bootstrap.ini" );
201218

202219
if(bootstrapini.GetInt("NDS-BOOTSTRAP","DEBUG",0) == 1) {
@@ -372,6 +389,6 @@ int main( int argc, char **argv) {
372389
printf("SD init failed!\n");
373390
}
374391

375-
while(1) { swiWaitForVBlank(); }
392+
stop();
376393
}
377394

0 commit comments

Comments
 (0)