File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed
Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -4027,13 +4027,16 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
40274027 if (ms ().theme == TWLSettings::EThemeHBL) {
40284028 currentBg = 0 ;
40294029 snd ().fadeOutStream ();
4030- } else if (ms ().theme != TWLSettings::EThemeSaturn) {
4031- fadeType = false ; // Fade to white
4032- snd ().fadeOutStream ();
4030+ } else {
4031+ if (ms ().theme != TWLSettings::EThemeSaturn) {
4032+ fadeType = false ; // Fade to white
4033+ snd ().fadeOutStream ();
40334034
4034- // Clear screen with white
4035- rocketVideo_playVideo = false ;
4036- tex ().unloadRotatingCubes ();
4035+ // Clear screen with white
4036+ rocketVideo_playVideo = false ;
4037+ tex ().unloadRotatingCubes ();
4038+ }
4039+ tex ().unloadBoxArt ();
40374040 }
40384041
40394042 if (ms ().updateRecentlyPlayedList ) {
Original file line number Diff line number Diff line change @@ -1541,6 +1541,15 @@ void ThemeTextures::unloadRotatingCubes() {
15411541 delete[] rotatingCubesLocation;
15421542 }
15431543}
1544+ void ThemeTextures::unloadBoxArt () {
1545+ if (dsiFeatures () && !ms ().macroMode && ms ().theme != TWLSettings::EThemeHBL && ms ().consoleModel == 0 && ms ().showBoxArt == 2 ) {
1546+ toncset32 (boxArtCache, 0 , 0x1B8000 /sizeof (u32 )); // Clear box art cache before freeing
1547+ for (int i = 0 ; i < 40 ; i++) {
1548+ boxArtFound[i] = false ;
1549+ }
1550+ delete[] boxArtCache;
1551+ }
1552+ }
15441553void ThemeTextures::videoSetup () {
15451554 logPrint (" tex().videoSetup()\n " );
15461555 // ////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ class ThemeTextures
9898
9999 void clearTopScreen ();
100100 void unloadRotatingCubes ();
101+ void unloadBoxArt ();
101102 static void videoSetup ();
102103private:
103104 void applyUserPaletteToAllGrfTextures ();
You can’t perform that action at this time.
0 commit comments