Skip to content

Commit

Permalink
R4 theme: Fix screen tearing when opening TWLMenu++ Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Apr 8, 2024
1 parent 0b57106 commit 55de2a7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions romsel_r4theme/arm9/source/graphics/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,13 +547,6 @@ static void loadPng(const bool top, const int startMenu, const std::string filen

void vBlankHandler()
{
if (doubleBuffer) {
extern bool startMenu;
dmaCopyHalfWordsAsynch(0, topImage[startMenu][secondBuffer], (u16*)BG_GFX_SUB+(256*32), 0x18000);
dmaCopyHalfWordsAsynch(1, bottomImage[startMenu][secondBuffer], BG_GFX, 0x18000);
secondBuffer = !secondBuffer;
}

glBegin2D();
{
if (fadeType == true) {
Expand Down Expand Up @@ -624,6 +617,13 @@ void vBlankHandler()
glEnd2D();
GFX_FLUSH = 0;

if (doubleBuffer) {
extern bool startMenu;
dmaCopyHalfWordsAsynch(0, topImage[startMenu][secondBuffer], (u16*)BG_GFX_SUB+(256*32), 0x18000);
dmaCopyHalfWordsAsynch(1, bottomImage[startMenu][secondBuffer], BG_GFX, 0x18000);
secondBuffer = !secondBuffer;
}

frameDelay = 0;
frameDelayEven = !frameDelayEven;
renderFrame = false;
Expand Down

0 comments on commit 55de2a7

Please sign in to comment.