mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-04 06:00:30 +00:00
calculate pixel-cell geometry from responses
This commit is contained in:
parent
fcd845c99a
commit
ccd2068ee3
@ -1729,14 +1729,18 @@ int ncinputlayer_init(tinfo* tcache, FILE* infp, queried_terminals_e* detected,
|
||||
if(cursor_y){
|
||||
*cursor_y = inits.cursor_y - 1;
|
||||
}
|
||||
if(inits.pixelwidth && inits.pixelheight){
|
||||
tcache->pixy = inits.pixelheight;
|
||||
tcache->pixx = inits.pixelwidth;
|
||||
}
|
||||
if(inits.dimy && inits.dimx){
|
||||
tcache->default_rows = inits.dimy;
|
||||
tcache->default_cols = inits.dimx;
|
||||
}
|
||||
if(inits.pixelwidth && inits.pixelheight){
|
||||
tcache->pixy = inits.pixelheight;
|
||||
tcache->pixx = inits.pixelwidth;
|
||||
if(tcache->default_rows && tcache->default_cols){
|
||||
tcache->cellpixx = tcache->pixx / tcache->default_cols;
|
||||
tcache->cellpixy = tcache->pixy / tcache->default_rows;
|
||||
}
|
||||
}
|
||||
if(inits.kittygraphics){ // kitty trumps sixel
|
||||
loginfo("advertised kitty; disabling sixel\n");
|
||||
tcache->color_registers = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user