Skip to content

Commit 07666c6

Browse files
committed
Add back ROM type switching
1 parent f87c45c commit 07666c6

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

romsel_dsimenutheme/arm9/source/fileBrowse.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,10 @@ string browseForFile(const vector<string> extensionList, const char* username)
338338
getDirectoryContents(dirContents[scrn], extensionList);
339339

340340
spawnedtitleboxes = 0;
341-
if (romtype == 0) {
342-
for(int i = 0; i < 39; i++) {
343-
if (i+pagenum*39 < file_count) {
344-
iconUpdate(dirContents[scrn].at(i+pagenum*39).isDirectory, dirContents[scrn].at(i+pagenum*39).name.c_str(), i);
345-
spawnedtitleboxes++;
346-
}
341+
for(int i = 0; i < 39; i++) {
342+
if (i+pagenum*39 < file_count) {
343+
if (romtype == 0) iconUpdate(dirContents[scrn].at(i+pagenum*39).isDirectory, dirContents[scrn].at(i+pagenum*39).name.c_str(), i);
344+
spawnedtitleboxes++;
347345
}
348346
}
349347

@@ -415,13 +413,17 @@ string browseForFile(const vector<string> extensionList, const char* username)
415413
// if (pressed & KEY_UP) cursorPosition -= ENTRY_PAGE_LENGTH;
416414
// if (pressed & KEY_DOWN) cursorPosition += ENTRY_PAGE_LENGTH;
417415

418-
/* if ((pressed & KEY_DOWN) && !titleboxXmoveleft && !titleboxXmoveright && showSTARTborder)
416+
if ((pressed & KEY_DOWN) && !titleboxXmoveleft && !titleboxXmoveright)
419417
{
420418
mmEffectEx(&snd_switch);
419+
pagenum = 0;
420+
cursorPosition = 0;
421+
titleboxXpos = 0;
422+
titlewindowXpos = 0;
421423
if (romtype == 1) romtype = 0;
422424
else romtype = 1;
423425
return "null";
424-
} */
426+
}
425427

426428
if (cursorPosition < 0)
427429
{

romsel_dsimenutheme/arm9/source/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void LoadSettings(void) {
8888
RemoveTrailingSlashes(romfolder);
8989
gbromfolder = settingsini.GetString("SRLOADER", "GBROM_FOLDER", "");
9090
RemoveTrailingSlashes(gbromfolder);
91-
// romtype = settingsini.GetInt("SRLOADER", "ROM_TYPE", 0);
91+
romtype = settingsini.GetInt("SRLOADER", "ROM_TYPE", 0);
9292
pagenum = settingsini.GetInt("SRLOADER", "PAGE_NUMBER", 0);
9393
cursorPosition = settingsini.GetInt("SRLOADER", "CURSOR_POSITION", 0);
9494

@@ -107,7 +107,7 @@ void SaveSettings(void) {
107107
// GUI
108108
CIniFile settingsini( settingsinipath );
109109

110-
// settingsini.SetInt("SRLOADER", "ROM_TYPE", romtype);
110+
settingsini.SetInt("SRLOADER", "ROM_TYPE", romtype);
111111
settingsini.SetInt("SRLOADER", "PAGE_NUMBER", pagenum);
112112
settingsini.SetInt("SRLOADER", "CURSOR_POSITION", cursorPosition);
113113

titleandsettings/arm9/source/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int main(int argc, char **argv) {
193193

194194
char vertext[12];
195195
// snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); // Doesn't work :(
196-
snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 1, 2);
196+
snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 2, 0);
197197

198198
if (showlogo) {
199199
graphicsInit();

0 commit comments

Comments
 (0)