Skip to content

Commit

Permalink
Fix #2387
Browse files Browse the repository at this point in the history
For real this time
  • Loading branch information
RocketRobz committed May 31, 2024
1 parent 3b51daf commit e15377b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
5 changes: 3 additions & 2 deletions romsel_dsimenutheme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,10 @@ void updateBoxArt(void) {

if (ms().theme == TWLSettings::ETheme3DS && rocketVideo_playVideo) {
rocketVideo_playVideo = false;
while (dmaBusy(1)) swiDelay(100); // Wait for frame to finish rendering
while (dmaBusy(1)); // Wait for frame to finish rendering
tex().drawOverRotatingCubes(); // Clear top screen cubes for 3DS theme
}
clearBoxArt(); // and clear top screen cubes for 3DS theme
clearBoxArt();

if (isDirectory[CURPOS]) {
if (ms().theme == TWLSettings::ETheme3DS && !rocketVideo_playVideo) {
Expand Down
15 changes: 15 additions & 0 deletions romsel_dsimenutheme/arm9/source/graphics/ThemeTextures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,21 @@ void ThemeTextures::drawOverBoxArt(uint photoWidth, uint photoHeight) {
boxArtWidth = boxArtHeight = 0;
}

// Redraw background over the rotating cubes bounds
void ThemeTextures::drawOverRotatingCubes() {
// if (!rotatingCubesLoaded) return;

extern u8 rocketVideo_height;
extern int rocketVideo_videoYpos;

beginBgSubModify();
for (uint y = 0; y < rocketVideo_height; y++) {
uint offset = (rocketVideo_videoYpos + y) * SCREEN_WIDTH;
tonccpy(_bgSubBuffer + offset, _topBorderBuffer + offset, sizeof(u16) * SCREEN_WIDTH);
}
commitBgSubModify();
}

ITCM_CODE void ThemeTextures::drawVolumeImage(int volumeLevel) {
if (!dsiFeatures())
return;
Expand Down
1 change: 1 addition & 0 deletions romsel_dsimenutheme/arm9/source/graphics/ThemeTextures.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class ThemeTextures
void loadBoxArtToMem(const char *filename, int num);
void drawBoxArt(const char* filename, bool inMem);
void drawOverBoxArt(uint photoWidth, uint photoHeight);
void drawOverRotatingCubes();

void drawVolumeImage(int volumeLevel);
void drawVolumeImageMacro(int volumeLevel);
Expand Down

0 comments on commit e15377b

Please sign in to comment.