mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-29 13:03:36 +01:00
render: fix missed clipping test in dtext()
This commit is contained in:
parent
5461d54083
commit
8442e0b9cf
2 changed files with 3 additions and 1 deletions
|
@ -59,7 +59,6 @@ static void topti_render(int x, int y, char const *str_char, font_t const *f,
|
|||
/* Vertical clipping */
|
||||
if(x >= dwindow.right || y >= dwindow.bottom) return;
|
||||
if(y + height <= dwindow.top) return;
|
||||
height = min(height, dwindow.bottom - y);
|
||||
|
||||
int top_overflow = y - dwindow.top;
|
||||
if(top_overflow < 0) {
|
||||
|
@ -67,6 +66,8 @@ static void topti_render(int x, int y, char const *str_char, font_t const *f,
|
|||
height += top_overflow;
|
||||
y -= top_overflow;
|
||||
}
|
||||
height = min(height, dwindow.bottom - y);
|
||||
if(height <= 0) return;
|
||||
|
||||
/* Move to top row */
|
||||
uint16_t *target = gint_vram + DWIDTH * y;
|
||||
|
|
|
@ -109,6 +109,7 @@ void topti_render(int x, int y, char const *str_char, font_t const *f,
|
|||
vdisp = dwindow.top - y;
|
||||
y = dwindow.top;
|
||||
}
|
||||
if(vdisp >= height) return;
|
||||
|
||||
uint32_t bg_mask[4];
|
||||
masks(dwindow.left, dwindow.right, bg_mask);
|
||||
|
|
Loading…
Reference in a new issue