Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Aug 26, 2024
1 parent eb1dd90 commit ce63a64
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 37 deletions.
17 changes: 9 additions & 8 deletions quickmenu/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,6 @@ void vBlankHandler()

drawCursorRect(std::roundf(cursorTL), std::roundf(cursorBL), std::roundf(cursorTR), std::roundf(cursorBR));
// }


if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
reloadIconPalettes();
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}
}
/*if (showdialogbox) {
glBoxFilled(15, 79, 241, 129+(dialogboxHeight*8), RGB15(0, 0, 0));
Expand All @@ -773,6 +765,15 @@ void vBlankHandler()
glEnd2D();
GFX_FLUSH = 0;
}

if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
if (!whiteScreen && startMenu) {
reloadIconPalettes();
}
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}
}

static void clockNeedleDraw(int angle, u32 length, u16 color) {
Expand Down
18 changes: 9 additions & 9 deletions romsel_aktheme/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1699,20 +1699,20 @@ void vBlankHandler()
glBoxFilled(16, 88, 240, 120+(dialogboxHeight*12), formBodyColor);
}

if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
if (!showdialogbox) {
reloadIconPalettes();
}
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}

glEnd2D();
GFX_FLUSH = 0;
updateFrame = false;
}

if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
if (!showdialogbox) {
reloadIconPalettes();
}
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}

if (doubleBuffer) {
dmaCopyHalfWordsAsynch(0, topImageWithText[secondBuffer], BG_GFX_SUB, 0x18000);
dmaCopyHalfWordsAsynch(1, bottomImageWithBar[secondBuffer], BG_GFX, 0x18000);
Expand Down
23 changes: 12 additions & 11 deletions romsel_dsimenutheme/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,23 +1193,24 @@ void vBlankHandler() {
}
}

if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
if (showdialogbox && dbox_Ypos == -192) {
// Reload the dialog box palettes here...
reloadDboxPalette();
} else if (!showdialogbox) {
reloadIconPalettes();
}
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}
//}
glEnd2D();
GFX_FLUSH = 0;
updateFrame = false;
}

if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
if (showdialogbox && dbox_Ypos == -192) {
// Reload the dialog box palettes here...
reloadDboxPalette();
} else if (!showdialogbox) {
reloadIconPalettes();
}
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}

if (boxArtColorDeband) {
//ndmaCopyWordsAsynch(0, tex().frameBuffer(secondBuffer), BG_GFX, 0x18000);
dmaCopyHalfWordsAsynch(1, tex().frameBufferBot(secondBuffer), BG_GFX_SUB, 0x18000);
Expand Down
18 changes: 9 additions & 9 deletions romsel_r4theme/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,20 +597,20 @@ void vBlankHandler()
glBoxFilled(0, 0, 256, 192, RGB15(0, 0, 0));
}

if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
if (!startMenu && !showdialogbox) {
reloadIconPalettes();
}
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}

glEnd2D();
GFX_FLUSH = 0;
updateFrame = false;
}

if (vblankRefreshCounter >= REFRESH_EVERY_VBLANKS) {
if (!startMenu && !showdialogbox) {
reloadIconPalettes();
}
vblankRefreshCounter = 0;
} else {
vblankRefreshCounter++;
}

if (doubleBuffer) {
extern bool startMenu;
dmaCopyHalfWordsAsynch(0, topImageWithText[startMenu][secondBuffer], BG_GFX_SUB, 0x18000);
Expand Down

0 comments on commit ce63a64

Please sign in to comment.