@@ -1095,65 +1095,6 @@ int r4Theme(void) {
1095
1095
1096
1096
keysSetRepeat (15 , 2 );
1097
1097
1098
- std::vector<std::string_view> extensionList = {
1099
- " .nds" , " .dsi" , " .ids" , " .srl" , " .app" , " .argv" , // NDS
1100
- " .agb" , " .gba" , " .mb" , // GBA
1101
- " .a26" , // Atari 2600
1102
- " .a52" , // Atari 5200
1103
- " .a78" , // Atari 7800
1104
- " .xex" , " .atr" , // Atari XEGS
1105
- " .msx" , // MSX
1106
- " .col" , // ColecoVision
1107
- " .int" , // Intellivision
1108
- " .m5" , // Sord M5
1109
- " .gb" , " .sgb" , " .gbc" , // Game Boy
1110
- " .nes" , " .fds" , // NES
1111
- " .sg" , // Sega SG-1000
1112
- " .sc" , // Sega SC-3000
1113
- " .sms" , // Sega Master System
1114
- " .gg" , // Sega Game Gear
1115
- " .gen" , // Sega Mega Drive/Genesis
1116
- " .smc" , " .sfc" , // SNES
1117
- " .ws" , " .wsc" , // WonderSwan
1118
- " .ngp" , " .ngc" , // Neo Geo Pocket
1119
- " .pce" , // PC Engine/TurboGrafx-16
1120
- " .dsk" , // Amstrad CPC
1121
- " .min" , // Pokémon mini
1122
- " .avi" , // Xvid (AVI)
1123
- " .rvid" , // Rocket Video
1124
- " .fv" , // FastVideo
1125
- " .gif" , // GIF
1126
- " .bmp" , // BMP
1127
- " .png" // Portable Network Graphics
1128
- };
1129
-
1130
- if (dsiFeatures () && ms ().consoleModel < 2 ) {
1131
- char currentDate[16 ];
1132
- time_t Raw;
1133
- time (&Raw);
1134
- const struct tm *Time = localtime (&Raw);
1135
-
1136
- strftime (currentDate, sizeof (currentDate), " %m/%d" , Time);
1137
-
1138
- if (strcmp (currentDate, " 04/01" ) == 0 ) {
1139
- // 3DS (for April Fools)
1140
- extensionList.emplace_back (" .3ds" );
1141
- extensionList.emplace_back (" .cia" );
1142
- extensionList.emplace_back (" .cxi" );
1143
- }
1144
- }
1145
-
1146
- if (memcmp (io_dldi_data->friendlyName , " DSTWO(Slot-1)" , 0xD ) == 0 ) {
1147
- extensionList.emplace_back (" .plg" ); // DSTWO Plugin
1148
- }
1149
-
1150
- if (ms ().blockedExtensions .size () > 0 ) {
1151
- auto toErase = std::remove_if (extensionList.begin (), extensionList.end (), [](std::string_view str) {
1152
- return std::find (ms ().blockedExtensions .begin (), ms ().blockedExtensions .end (), str) != ms ().blockedExtensions .end ();
1153
- });
1154
- extensionList.erase (toErase, extensionList.end ());
1155
- }
1156
-
1157
1098
srand (time (NULL ));
1158
1099
1159
1100
bool copyDSiWareSavBack =
@@ -1199,7 +1140,6 @@ int r4Theme(void) {
1199
1140
}
1200
1141
1201
1142
while (1 ) {
1202
-
1203
1143
if (startMenu) {
1204
1144
fadeType = true ; // Fade in from white
1205
1145
@@ -1417,6 +1357,71 @@ int r4Theme(void) {
1417
1357
iprintf (" Start failed. Error %i\n " , err);
1418
1358
}
1419
1359
} else {
1360
+ std::vector<std::string_view> extensionList = {
1361
+ " .nds" , " .dsi" , " .ids" , " .srl" , " .app" , " .argv" , // NDS
1362
+ " .agb" , " .gba" , " .mb" , // GBA
1363
+ " .a26" , // Atari 2600
1364
+ " .a52" , // Atari 5200
1365
+ " .a78" , // Atari 7800
1366
+ " .xex" , " .atr" , // Atari XEGS
1367
+ " .msx" , // MSX
1368
+ " .col" , // ColecoVision
1369
+ " .int" , // Intellivision
1370
+ " .m5" , // Sord M5
1371
+ " .gb" , " .sgb" , " .gbc" , // Game Boy
1372
+ " .nes" , " .fds" , // NES/Famicom
1373
+ " .sg" , // Sega SG-1000
1374
+ " .sc" , // Sega SC-3000
1375
+ " .sms" , // Sega Master System
1376
+ " .gg" , // Sega Game Gear
1377
+ " .ws" , " .wsc" , // WonderSwan
1378
+ " .ngp" , " .ngc" , // Neo Geo Pocket
1379
+ " .pce" , // PC Engine/TurboGrafx-16
1380
+ " .dsk" , // Amstrad CPC
1381
+ " .min" , // Pokémon mini
1382
+ " .avi" , // Xvid (AVI)
1383
+ " .fv" , // FastVideo
1384
+ " .gif" , // GIF
1385
+ " .bmp" , // BMP
1386
+ " .png" // Portable Network Graphics
1387
+ };
1388
+
1389
+ if (dsiFeatures () && ms ().consoleModel < 2 ) {
1390
+ char currentDate[16 ];
1391
+ time_t Raw;
1392
+ time (&Raw);
1393
+ const struct tm *Time = localtime (&Raw);
1394
+
1395
+ strftime (currentDate, sizeof (currentDate), " %m/%d" , Time);
1396
+
1397
+ if (strcmp (currentDate, " 04/01" ) == 0 ) {
1398
+ // 3DS (for April Fools)
1399
+ extensionList.emplace_back (" .3ds" );
1400
+ extensionList.emplace_back (" .cia" );
1401
+ extensionList.emplace_back (" .cxi" );
1402
+ }
1403
+ }
1404
+
1405
+ if (!ms ().secondaryDevice ) {
1406
+ extensionList.emplace_back (" .gen" ); // Sega Mega Drive/Genesis
1407
+ }
1408
+
1409
+ if (!ms ().secondaryDevice || ms ().newSnesEmuVer ) {
1410
+ extensionList.emplace_back (" .smc" ); // SNES
1411
+ extensionList.emplace_back (" .sfc" ); // Super Famicom
1412
+ }
1413
+
1414
+ if (memcmp (io_dldi_data->friendlyName , " DSTWO(Slot-1)" , 0xD ) == 0 ) {
1415
+ extensionList.emplace_back (" .plg" ); // DSTWO Plugin
1416
+ }
1417
+
1418
+ if (ms ().blockedExtensions .size () > 0 ) {
1419
+ auto toErase = std::remove_if (extensionList.begin (), extensionList.end (), [](std::string_view str) {
1420
+ return std::find (ms ().blockedExtensions .begin (), ms ().blockedExtensions .end (), str) != ms ().blockedExtensions .end ();
1421
+ });
1422
+ extensionList.erase (toErase, extensionList.end ());
1423
+ }
1424
+
1420
1425
snprintf (path, sizeof (path), " %s" , ms ().romfolder [ms ().secondaryDevice ].c_str ());
1421
1426
// Set directory
1422
1427
chdir (path);
0 commit comments