Skip to content

Commit

Permalink
Add back ROM type switching
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed May 27, 2017
1 parent f87c45c commit 07666c6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions romsel_dsimenutheme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,10 @@ string browseForFile(const vector<string> 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++;
}
}

Expand Down Expand Up @@ -415,13 +413,17 @@ string browseForFile(const vector<string> 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)
{
Expand Down
4 changes: 2 additions & 2 deletions romsel_dsimenutheme/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion titleandsettings/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 07666c6

Please sign in to comment.