diff --git a/src/demo/input.c b/src/demo/input.c index 01570754c..a35045135 100644 --- a/src/demo/input.c +++ b/src/demo/input.c @@ -52,7 +52,7 @@ char32_t demo_getc(struct notcurses* nc, const struct timespec* ts, ncinput* ni) // yes, i'd like CLOCK_MONOTONIC too, but pthread_cond_timedwait() is based off // of crappy CLOCK_REALTIME :/ // abstime shouldn't be further out than our maximum sleep time -- this can - // lead to 0 frames output during the wait (happening now with zoo FIXME) + // lead to 0 frames output during the wait if(ts){ ns = timespec_to_ns(ts); }else{ diff --git a/src/lib/blit.c b/src/lib/blit.c index 68f1c7309..e133c8cf3 100644 --- a/src/lib/blit.c +++ b/src/lib/blit.c @@ -859,6 +859,7 @@ sixel_blit(ncplane* nc, int placey, int placex, int linesize, // FIXME find sixels with common colors for single register program unsigned bitsused = 0; // once 63, we're done int colorreg = 1; // leave 0 as background + bool printed = false; for(int sy = y ; sy < dimy && sy < y + 6 ; ++sy){ const uint32_t* rgb = (const uint32_t*)(data + (linesize * sy) + (visx * 4)); if(ffmpeg_trans_p(ncpixel_a(*rgb))){ @@ -882,12 +883,14 @@ sixel_blit(ncplane* nc, int placey, int placex, int linesize, // FIXME use percentages(rgb) // bitstring is added to 63, resulting in [63, 126] aka '?'..'~' int n = snprintf(sixel + offset, sizeof(sixel) - offset, - "#%d;2;%d;%d;%d%c", colorreg, 100, 100, 100, c); + "%s#%d;2;%d;%d;%d#%d%c", printed ? "$" : "", + colorreg, 100, 100, 100, colorreg, c); if(n < 0){ return -1; } offset += n; ++colorreg; + printed = true; } if(bitsused == 63){ break; diff --git a/src/lib/direct.cpp b/src/lib/direct.cpp index b2f6be033..9ae6a4de8 100644 --- a/src/lib/direct.cpp +++ b/src/lib/direct.cpp @@ -451,6 +451,7 @@ ncdirect_dump_plane(ncdirect* n, const ncplane* np, int xoff){ if(term_emit(n->tcache.pixeloff, n->ttyfp, false)){ return -1; } + pixelmode = false; } // FIXME replace with a SGR clear ncdirect_set_fg_default(n);