Skip to content

Commit

Permalink
Merge pull request #58 from aiguanachein/master
Browse files Browse the repository at this point in the history
Fix problems updating window on BW hardware when compiled on Color mode
  • Loading branch information
Zal0 committed Aug 18, 2023
2 parents 4e25449 + 1500591 commit 2dbdcd8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions common/src/Scroll.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,18 @@ attr;
set_win_tile_xy(x, y, data);

#ifdef CGB
VBK_REG = 1;
if (_cpu == CGB_TYPE) {
VBK_REG = 1;

UINT8 c = attr ? *attr : scroll_tile_info[data];
c += offsetts[1];
UINT8 c = attr ? *attr : scroll_tile_info[data];
c += offsetts[1];

if(bg_or_win == 0)
set_bkg_tile_xy(x, y, c);
else
set_win_tile_xy(x, y, c);
VBK_REG = 0;
if (bg_or_win == 0)
set_bkg_tile_xy(x, y, c);
else
set_win_tile_xy(x, y, c);
VBK_REG = 0;
}
#endif
}

Expand Down

0 comments on commit 2dbdcd8

Please sign in to comment.