ncdirect_dump_plane: fix sprite_draw() error check #1980

This commit is contained in:
nick black 2021-07-24 16:32:16 -04:00
parent b67c6b8fb2
commit ddbc36e872
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 4 additions and 4 deletions

View File

@ -515,7 +515,7 @@ ncdirect_dump_plane(ncdirect* n, const ncplane* np, int xoff){
if(ncdirect_flush(n)){
return -1;
}
if(sprite_draw(&n->tcache, NULL, np->sprite, n->ttyfp, 0, xoff)){
if(sprite_draw(&n->tcache, NULL, np->sprite, n->ttyfp, 0, xoff) < 0){
return -1;
}
if(sprite_commit(&n->tcache, n->ttyfp, np->sprite, true)){

View File

@ -675,7 +675,7 @@ uint8_t* sprixel_auxiliary_vector(const sprixel* s);
static inline int
sprite_scrub(const notcurses* n, const ncpile* p, sprixel* s){
//sprixel_debug(s, stderr);
logdebug("Sprixel %u state %d\n", s->id, s->invalidated);
logdebug("sprixel %u state %d\n", s->id, s->invalidated);
return n->tcache.pixel_scrub(p, s);
}
@ -685,7 +685,7 @@ static inline int
sprite_draw(const tinfo* ti, const ncpile* p, sprixel* s, FILE* out,
int y, int x){
//sprixel_debug(s, stderr);
logdebug("Sprixel %u state %d\n", s->id, s->invalidated);
logdebug("sprixel %u state %d\n", s->id, s->invalidated);
return ti->pixel_draw(ti, p, s, out, y, x);
}
@ -695,7 +695,7 @@ static inline int
sprite_redraw(const tinfo* ti, const ncpile* p, sprixel* s, FILE* out,
int y, int x){
//sprixel_debug(s, stderr);
logdebug("Sprixel %u state %d\n", s->id, s->invalidated);
logdebug("sprixel %u state %d\n", s->id, s->invalidated);
if(s->invalidated == SPRIXEL_MOVED && ti->pixel_move){
// if we are kitty prior to 0.20.0, C=1 isn't available to us, and we must
// not emit it. we use sixel_maxy_pristine as a side channel to encode