From 07666c67500522bb715a3fc8c05075a84d74d25a Mon Sep 17 00:00:00 2001 From: Robz8 Date: Fri, 26 May 2017 18:35:24 -0600 Subject: [PATCH] Add back ROM type switching --- romsel_dsimenutheme/arm9/source/fileBrowse.cpp | 18 ++++++++++-------- romsel_dsimenutheme/arm9/source/main.cpp | 4 ++-- titleandsettings/arm9/source/main.cpp | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/romsel_dsimenutheme/arm9/source/fileBrowse.cpp b/romsel_dsimenutheme/arm9/source/fileBrowse.cpp index c81aa4dc10..9283acfaf3 100644 --- a/romsel_dsimenutheme/arm9/source/fileBrowse.cpp +++ b/romsel_dsimenutheme/arm9/source/fileBrowse.cpp @@ -338,12 +338,10 @@ string browseForFile(const vector extensionList, const char* username) getDirectoryContents(dirContents[scrn], extensionList); spawnedtitleboxes = 0; - if (romtype == 0) { - for(int i = 0; i < 39; i++) { - if (i+pagenum*39 < file_count) { - iconUpdate(dirContents[scrn].at(i+pagenum*39).isDirectory, dirContents[scrn].at(i+pagenum*39).name.c_str(), i); - spawnedtitleboxes++; - } + for(int i = 0; i < 39; i++) { + if (i+pagenum*39 < file_count) { + if (romtype == 0) iconUpdate(dirContents[scrn].at(i+pagenum*39).isDirectory, dirContents[scrn].at(i+pagenum*39).name.c_str(), i); + spawnedtitleboxes++; } } @@ -415,13 +413,17 @@ string browseForFile(const vector extensionList, const char* username) // if (pressed & KEY_UP) cursorPosition -= ENTRY_PAGE_LENGTH; // if (pressed & KEY_DOWN) cursorPosition += ENTRY_PAGE_LENGTH; - /* if ((pressed & KEY_DOWN) && !titleboxXmoveleft && !titleboxXmoveright && showSTARTborder) + if ((pressed & KEY_DOWN) && !titleboxXmoveleft && !titleboxXmoveright) { mmEffectEx(&snd_switch); + pagenum = 0; + cursorPosition = 0; + titleboxXpos = 0; + titlewindowXpos = 0; if (romtype == 1) romtype = 0; else romtype = 1; return "null"; - } */ + } if (cursorPosition < 0) { diff --git a/romsel_dsimenutheme/arm9/source/main.cpp b/romsel_dsimenutheme/arm9/source/main.cpp index 8fc2fb09a3..74b0002106 100644 --- a/romsel_dsimenutheme/arm9/source/main.cpp +++ b/romsel_dsimenutheme/arm9/source/main.cpp @@ -88,7 +88,7 @@ void LoadSettings(void) { RemoveTrailingSlashes(romfolder); gbromfolder = settingsini.GetString("SRLOADER", "GBROM_FOLDER", ""); RemoveTrailingSlashes(gbromfolder); - // romtype = settingsini.GetInt("SRLOADER", "ROM_TYPE", 0); + romtype = settingsini.GetInt("SRLOADER", "ROM_TYPE", 0); pagenum = settingsini.GetInt("SRLOADER", "PAGE_NUMBER", 0); cursorPosition = settingsini.GetInt("SRLOADER", "CURSOR_POSITION", 0); @@ -107,7 +107,7 @@ void SaveSettings(void) { // GUI CIniFile settingsini( settingsinipath ); - // settingsini.SetInt("SRLOADER", "ROM_TYPE", romtype); + settingsini.SetInt("SRLOADER", "ROM_TYPE", romtype); settingsini.SetInt("SRLOADER", "PAGE_NUMBER", pagenum); settingsini.SetInt("SRLOADER", "CURSOR_POSITION", cursorPosition); diff --git a/titleandsettings/arm9/source/main.cpp b/titleandsettings/arm9/source/main.cpp index 8e582ee6e4..49bffd62af 100644 --- a/titleandsettings/arm9/source/main.cpp +++ b/titleandsettings/arm9/source/main.cpp @@ -193,7 +193,7 @@ int main(int argc, char **argv) { char vertext[12]; // snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); // Doesn't work :( - snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 1, 2); + snprintf(vertext, sizeof(vertext), "Ver %d.%d.%d ", 1, 2, 0); if (showlogo) { graphicsInit();