[termdesc] don't enable sixel graphics with 0 color registers

pull/2514/head
nick black 2 years ago
parent 09945c8c9d
commit 85043747ed
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1362,10 +1362,13 @@ int interrogate_terminfo(tinfo* ti, FILE* out, unsigned utf8,
} }
build_supported_styles(ti); build_supported_styles(ti);
if(ti->pixel_draw == NULL && ti->pixel_draw_late == NULL){ if(ti->pixel_draw == NULL && ti->pixel_draw_late == NULL){
// color_registers was only assigned if kitty_graphics were unavailable
if(ti->color_registers > 0){
setup_sixel_bitmaps(ti, ti->ttyfd, invertsixel);
}
if(kitty_graphics){ if(kitty_graphics){
setup_kitty_bitmaps(ti, ti->ttyfd, NCPIXEL_KITTY_STATIC); setup_kitty_bitmaps(ti, ti->ttyfd, NCPIXEL_KITTY_STATIC);
} }
setup_sixel_bitmaps(ti, ti->ttyfd, invertsixel);
} }
return 0; return 0;

@ -74,7 +74,6 @@ TEST_CASE("Direct") {
} }
} }
/*
#ifndef NOTCURSES_USE_MULTIMEDIA #ifndef NOTCURSES_USE_MULTIMEDIA
SUBCASE("VisualDisabled"){ SUBCASE("VisualDisabled"){
CHECK(!ncdirect_canopen_images(nc_)); CHECK(!ncdirect_canopen_images(nc_));
@ -172,7 +171,6 @@ TEST_CASE("Direct") {
} }
} }
#endif #endif
*/
CHECK(0 == ncdirect_stop(nc_)); CHECK(0 == ncdirect_stop(nc_));

Loading…
Cancel
Save