mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-16 00:13:00 +00:00
rebuild: only free auxvec for non-animation #1895
This commit is contained in:
parent
811bc9eb65
commit
6d6f69a02b
@ -705,9 +705,11 @@ sprite_rebuild(const notcurses* nc, sprixel* s, int ycell, int xcell){
|
||||
uint8_t* auxvec = s->n->tam[idx].auxvector;
|
||||
assert(auxvec);
|
||||
ret = nc->tcache.pixel_rebuild(s, ycell, xcell, auxvec);
|
||||
if(ret > 0){
|
||||
free(auxvec);
|
||||
s->n->tam[idx].auxvector = NULL;
|
||||
}
|
||||
}
|
||||
// don't upset SPRIXEL_MOVED
|
||||
if(s->invalidated == SPRIXEL_QUIESCENT){
|
||||
if(s->n->tam[idx].state != SPRIXCELL_TRANSPARENT &&
|
||||
|
@ -332,7 +332,7 @@ int kitty_rebuild(sprixel* s, int ycell, int xcell, uint8_t* auxvec){
|
||||
if(--targy == 0){
|
||||
s->n->tam[s->dimx * ycell + xcell].state = state;
|
||||
s->invalidated = SPRIXEL_INVALIDATED;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
thisrow = targx;
|
||||
//fprintf(stderr, "BUMP IT: %d %d %d %d\n", nextpixel, s->pixx, targx, chomped);
|
||||
|
@ -914,7 +914,7 @@ int sixel_rebuild(sprixel* s, int ycell, int xcell, uint8_t* auxvec){
|
||||
newstate = SPRIXCELL_OPAQUE_SIXEL;
|
||||
}
|
||||
s->n->tam[s->dimx * ycell + xcell].state = newstate;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 80 (sixel scrolling) is enabled by default. 8452 is not. XTSAVE/XTRESTORE
|
||||
|
@ -148,6 +148,7 @@ wipebitmap(struct notcurses* nc){
|
||||
|
||||
int main(void){
|
||||
struct notcurses_options opts = {
|
||||
.loglevel = NCLOGLEVEL_TRACE,
|
||||
};
|
||||
struct notcurses* nc = notcurses_core_init(&opts, NULL);
|
||||
if(notcurses_check_pixel_support(nc) < 1){
|
||||
|
Loading…
Reference in New Issue
Block a user