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

This commit is contained in:
nick black 2022-01-01 01:10:59 -05:00
parent 09945c8c9d
commit 85043747ed
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 4 additions and 3 deletions

View File

@ -1362,10 +1362,13 @@ int interrogate_terminfo(tinfo* ti, FILE* out, unsigned utf8,
}
build_supported_styles(ti);
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){
setup_kitty_bitmaps(ti, ti->ttyfd, NCPIXEL_KITTY_STATIC);
}
setup_sixel_bitmaps(ti, ti->ttyfd, invertsixel);
}
return 0;

View File

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