Skip to content

Commit

Permalink
gfxlib2: gfx_dos drivers initialize the internal dirty array based on…
Browse files Browse the repository at this point in the history
… scanline size
  • Loading branch information
jayrm committed Mar 25, 2023
1 parent 8f4ff82 commit 8d9c1ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Expand Up @@ -32,6 +32,7 @@ Version 1.10.0
- fbc: only up-cast initializers when needed. New behaviour is to try matching initializers without up-casting before matching with up-casting.
- fbc: don't join operators separated by white space. Previously, '<' + '=', '<' + '>', '=' + '>', and '-' + '>' were joined together even if separated by whitespace.
- fbc: don't skip whitespace between decimal point and digit. Previously, '.' + '0..9' floating point literals were allowed to be separated by whitespace.
- gfxlib2: gfx_dos drivers initialize the internal dirty array based on scanline size

[added]
- gas/gas64: '.cif_sections' and '.cif_' directives for stack unwinding (adeyblue)
Expand Down
4 changes: 2 additions & 2 deletions src/gfxlib2/dos/gfx_dos.c
Expand Up @@ -359,7 +359,7 @@ static int fb_dos_timer_handler(unsigned irq)
}

fb_dos.update();
fb_hMemSet(__fb_gfx->dirty, FALSE, fb_dos.h);
fb_hMemSet(__fb_gfx->dirty, FALSE, __fb_gfx->h * __fb_gfx->scanline_size);

if ( fb_dos.mouse_ok && fb_dos.mouse_cursor ) {
fb_hSoftCursorUnput(mouse_x, mouse_y);
Expand Down Expand Up @@ -569,7 +569,7 @@ int fb_dos_init(char *title, int w, int h, int depth, int refresh_rate, int flag
if (!fb_dos_timer_init(TIMER_HZ))
return -1;

fb_hMemSet(__fb_gfx->dirty, TRUE, __fb_gfx->h);
fb_hMemSet(__fb_gfx->dirty, TRUE, __fb_gfx->h * __fb_gfx->scanline_size);

fb_dos.locked = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/gfxlib2/unix/gfx_driver_opengl_x11.c
Expand Up @@ -225,7 +225,7 @@ static int driver_init(char *title, int w, int h, int depth, int refresh_rate, i
if (__fb_gl_params.init_scale>1){
__fb_gl_params.scale = __fb_gl_params.init_scale;
free(__fb_gfx->dirty);
__fb_gfx->dirty = (char *)calloc(1, __fb_gfx->h * __fb_gfx->scanline_size* __fb_gl_params.scale);
__fb_gfx->dirty = (char *)calloc(1, __fb_gfx->h * __fb_gfx->scanline_size * __fb_gl_params.scale);
}

result = fb_hX11Init(title, w * __fb_gl_params.scale, h * __fb_gl_params.scale, info->depth, refresh_rate, flags);
Expand Down

0 comments on commit 8d9c1ba

Please sign in to comment.