From 9be2f138e3bf8eb769fa87314fa263815b4b7e87 Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 18 Feb 2021 01:08:55 -0500 Subject: [PATCH] move sixel support bit to tcache from notcurses #200 --- src/lib/internal.h | 2 +- src/lib/notcurses.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/internal.h b/src/lib/internal.h index 194309924..2257a2f5e 100644 --- a/src/lib/internal.h +++ b/src/lib/internal.h @@ -282,6 +282,7 @@ typedef struct tinfo { uint32_t bg_collides_default; bool sextants; // do we have (good, vetted) Unicode 13 sextant support? bool braille; // do we have Braille support? (linux console does not) + bool libsixel; // do we have Sixel support? } tinfo; typedef struct ncinputlayer { @@ -363,7 +364,6 @@ typedef struct notcurses { int loglevel; palette256 palette; // 256-indexed palette can be used instead of/with RGB bool palette_damage[NCPALETTESIZE]; - bool libsixel; // do we have Sixel support? } notcurses; #include "blitset.h" diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index a808df250..c822c6a80 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -935,7 +935,6 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){ ret->lastframe = NULL; ret->lfdimy = 0; ret->lfdimx = 0; - ret->libsixel = false; egcpool_init(&ret->pool); if((ret->loglevel = opts->loglevel) > NCLOGLEVEL_TRACE || ret->loglevel < 0){ fprintf(stderr, "Invalid loglevel %d\n", ret->loglevel); @@ -2032,7 +2031,7 @@ bool notcurses_canchangecolor(const notcurses* nc){ } bool notcurses_cansixel(const notcurses* nc){ - return nc->libsixel; + return nc->tcache.libsixel; } palette256* palette256_new(notcurses* nc){