mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
ncvisual_render_pixels: hide any old sprixels
This commit is contained in:
parent
2f47d9adef
commit
0dbd3cf830
@ -605,6 +605,12 @@ ncplane* ncvisual_render_pixels(notcurses* nc, ncvisual* ncv, const struct blits
|
||||
if(ncv->spx == NULL || n->sprite == NULL){
|
||||
int cols = dispcols / bargs.u.pixel.celldimx + !!(dispcols % bargs.u.pixel.celldimx);
|
||||
int rows = disprows / bargs.u.pixel.celldimy + !!(disprows % bargs.u.pixel.celldimy);
|
||||
if(ncv->spx){
|
||||
sprixel_hide(ncv->spx);
|
||||
}
|
||||
if(n->sprite){
|
||||
sprixel_hide(n->sprite);
|
||||
}
|
||||
if((ncv->spx = sprixel_alloc(n, ncv, rows, cols)) == NULL){
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user