Skip to content

Commit

Permalink
Double redraw bg
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Oct 8, 2023
1 parent 3fec9c7 commit b58fda5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions 32blit/gameblit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Menu menu("Menu",

bool menuOpen = false;

bool redrawBG = true;
int redrawBG = 2;
uint32_t lastUpdate = 0;

#ifdef _MSC_VER
Expand Down Expand Up @@ -486,7 +486,8 @@ void render(uint32_t time_ms)
else
packedToRGB(asset_background, blit::screen); // unpack directly to the screen

redrawBG = !updateRunning;
if(updateRunning)
redrawBG--;
}
#endif

Expand Down Expand Up @@ -575,7 +576,7 @@ void render(uint32_t time_ms)
if(menuOpen)
{
menu.render();
redrawBG = true;
redrawBG = 2;
}

#ifdef PROFILER
Expand Down Expand Up @@ -627,7 +628,7 @@ void update(uint32_t time_ms)
if(blit::buttons.released & blit::Button::JOYSTICK)
{
awfulScale = !awfulScale;
redrawBG = true;
redrawBG = 2;
}

loadedBanks = 0;
Expand Down

0 comments on commit b58fda5

Please sign in to comment.