mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
use pixel_draw to verify bitmap support
This commit is contained in:
parent
8022faf2c0
commit
f388e3d7da
@ -63,7 +63,7 @@ tinfo_debug_caps(const tinfo* ti, FILE* debugfp, int rows, int cols,
|
||||
capyn(get_escape(ti, ESCAPE_BGOP)));
|
||||
fprintf(debugfp, "%srows: %u cols: %u rpx: %u cpx: %u (%dx%d)\n",
|
||||
indent, rows, cols, ti->cellpixy, ti->cellpixx, rows * ti->cellpixy, cols * ti->cellpixx);
|
||||
if(!ti->pixel_init){
|
||||
if(!ti->pixel_draw){
|
||||
fprintf(debugfp, "%sdidn't detect bitmap graphics support\n", indent);
|
||||
}else if(ti->sixel_maxy){
|
||||
fprintf(debugfp, "%smax sixel size: %dx%d colorregs: %u\n",
|
||||
|
@ -255,7 +255,7 @@ int update_term_dimensions(int fd, int* rows, int* cols, tinfo* tcache,
|
||||
tcache->cellpixy = ws.ws_row ? ws.ws_ypixel / ws.ws_row : 0;
|
||||
tcache->cellpixx = ws.ws_col ? ws.ws_xpixel / ws.ws_col : 0;
|
||||
if(tcache->cellpixy == 0 || tcache->cellpixx == 0){
|
||||
tcache->pixel_init = NULL; // disable support
|
||||
tcache->pixel_draw = NULL; // disable support
|
||||
}
|
||||
}
|
||||
if(tcache->sixel_maxy_pristine){
|
||||
@ -987,7 +987,7 @@ recursive_lock_init(pthread_mutex_t *lock){
|
||||
}
|
||||
|
||||
int notcurses_check_pixel_support(const notcurses* nc){
|
||||
if(nc->tcache.pixel_init){
|
||||
if(nc->tcache.pixel_draw){
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user