Skip partial updates when updating entire screen (#90)

This commit is contained in:
tinkeros 2023-02-25 19:41:54 -06:00 committed by GitHub
parent 5f24bd97bb
commit 4b3c344825
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -395,10 +395,16 @@ U0 GrUpdateScreen32()
while (src < size) //draw 2 pixels at a time while (src < size) //draw 2 pixels at a time
*dst++ = gr_palette[*src++ & 0xFF] | gr_palette[*src++ & 0xFF] << 32; *dst++ = gr_palette[*src++ & 0xFF] | gr_palette[*src++ & 0xFF] << 32;
GrCalcScreenUpdates;
if (LBtr(&sys_semas[SEMA_FLUSH_VBE_IMAGE], 0)) if (LBtr(&sys_semas[SEMA_FLUSH_VBE_IMAGE], 0))
{
MemCopy(text.fb_alias, text.raw_screen, text.buffer_size); MemCopy(text.fb_alias, text.raw_screen, text.buffer_size);
src -= GR_WIDTH * GR_HEIGHT; // Reset src ptr
MemCopy(gr.screen_cache, src, GR_WIDTH * GR_HEIGHT);
}
else
{
GrCalcScreenUpdates;
}
} }
U0 GrUpdateScreen() U0 GrUpdateScreen()