Skip to content

Commit 316b6c2

Browse files
committed
DSi/3DS theme: Only render shoulder buttons once
1 parent 5b4b2e4 commit 316b6c2

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

romsel_dsimenutheme/arm9/source/fileBrowse.cpp

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ extern bool flashcardUsed;
113113
char boxArtPath[40][256];
114114

115115
bool boxArtLoaded = false;
116+
bool shouldersRendered = false;
116117
bool settingsChanged = false;
117118

118119
extern void SaveSettings();
@@ -530,18 +531,21 @@ string browseForFile(const vector<string> extensionList, const char* username)
530531
}
531532
}
532533

533-
showLshoulder = false;
534-
showRshoulder = false;
535-
if (startMenu) {
536-
} else {
537-
if (pagenum != 0) {
538-
showLshoulder = true;
539-
}
540-
if (file_count > 40+pagenum*40) {
541-
showRshoulder = true;
534+
if (!shouldersRendered) {
535+
showLshoulder = false;
536+
showRshoulder = false;
537+
if (startMenu) {
538+
} else {
539+
if (pagenum != 0) {
540+
showLshoulder = true;
541+
}
542+
if (file_count > 40+pagenum*40) {
543+
showRshoulder = true;
544+
}
542545
}
546+
loadShoulders();
547+
shouldersRendered = true;
543548
}
544-
loadShoulders();
545549

546550
// Power saving loop. Only poll the keys once per frame and sleep the CPU if there is nothing else to do
547551
do
@@ -707,6 +711,7 @@ string browseForFile(const vector<string> extensionList, const char* username)
707711
whiteScreen = true;
708712
if (showBoxArt) clearBoxArt(); // Clear box art
709713
boxArtLoaded = false;
714+
shouldersRendered = false;
710715
showbubble = false;
711716
showSTARTborder = false;
712717
clearText();
@@ -876,6 +881,7 @@ string browseForFile(const vector<string> extensionList, const char* username)
876881
whiteScreen = true;
877882
if (showBoxArt) clearBoxArt(); // Clear box art
878883
boxArtLoaded = false;
884+
shouldersRendered = false;
879885
showbubble = false;
880886
showSTARTborder = false;
881887
clearText();
@@ -894,6 +900,7 @@ string browseForFile(const vector<string> extensionList, const char* username)
894900
whiteScreen = true;
895901
if (showBoxArt) clearBoxArt(); // Clear box art
896902
boxArtLoaded = false;
903+
shouldersRendered = false;
897904
showbubble = false;
898905
showSTARTborder = false;
899906
clearText();
@@ -930,6 +937,7 @@ string browseForFile(const vector<string> extensionList, const char* username)
930937
SaveSettings();
931938
settingsChanged = false;
932939
}
940+
shouldersRendered = false;
933941
whiteScreen = true;
934942
clearText();
935943
whiteScreen = false;
@@ -947,6 +955,7 @@ string browseForFile(const vector<string> extensionList, const char* username)
947955
whiteScreen = true;
948956
if (showBoxArt) clearBoxArt(); // Clear box art
949957
boxArtLoaded = false;
958+
shouldersRendered = false;
950959
showbubble = false;
951960
showSTARTborder = false;
952961
clearText();
@@ -992,6 +1001,7 @@ string browseForFile(const vector<string> extensionList, const char* username)
9921001
remove(dirContents[scrn].at(cursorPosition+pagenum*40).name.c_str()); // Remove game/folder
9931002
if (showBoxArt) clearBoxArt(); // Clear box art
9941003
boxArtLoaded = false;
1004+
shouldersRendered = false;
9951005
showbubble = false;
9961006
showSTARTborder = false;
9971007
clearText();
@@ -1039,6 +1049,7 @@ string browseForFile(const vector<string> extensionList, const char* username)
10391049
whiteScreen = true;
10401050
if (showBoxArt) clearBoxArt(); // Clear box art
10411051
boxArtLoaded = false;
1052+
shouldersRendered = false;
10421053
showbubble = false;
10431054
showSTARTborder = false;
10441055
clearText();

romsel_dsimenutheme/arm9/source/graphics/graphics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ void graphicsInit()
11211121
// Set up enough texture memory for our textures
11221122
// Bank A is just 128kb and we are using 194 kb of
11231123
// sprites
1124-
vramSetBankA(VRAM_A_TEXTURE);
1124+
//vramSetBankA(VRAM_A_TEXTURE);
11251125
vramSetBankB(VRAM_B_TEXTURE);
11261126
vramSetBankC(VRAM_C_SUB_BG_0x06200000);
11271127
vramSetBankF(VRAM_F_TEX_PALETTE); // Allocate VRAM bank for all the palettes

0 commit comments

Comments
 (0)