Skip to content

Commit

Permalink
minimal pico gba cart port
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Jan 15, 2024
1 parent 996a10a commit 3918ff9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 32blit/gameblit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ void render(uint32_t time_ms)

if(redrawBG || !updateRunning)
{
if(awfulScale)
if(awfulScale || blit::screen.bounds.w < 320)
{
blit::screen.pen = blit::Pen(145, 142, 147);
blit::screen.clear();
Expand All @@ -496,6 +496,14 @@ void render(uint32_t time_ms)
blit::screen.blit(&dmgScreen, {0, 0, 160, 144}, {80, 48});
#endif

#ifdef BLIT_BOARD_GBACART
for(int y = 0; y < 144; y++)
{
auto ptr = blit::screen.ptr(40, y + 8);
memcpy(ptr, screenData + y * 160, 160 * 2);
}
#endif

#ifndef PICO_BUILD
auto gbScreen = screenData;

Expand Down

0 comments on commit 3918ff9

Please sign in to comment.