reprogram_console_font: take entire tinfo

pull/2053/head
nick black 3 years ago committed by nick black
parent d920ca5636
commit 5992effd38

@ -573,7 +573,7 @@ reprogram_linux_font(int fd, struct console_font_op* cfo,
return 0;
}
int reprogram_console_font(int fd, unsigned no_font_changes, bool* quadrants){
int reprogram_console_font(tinfo* ti, unsigned no_font_changes, bool* quadrants){
struct console_font_op cfo = {
.op = KD_FONT_OP_GET,
.charcount = 512,
@ -595,7 +595,7 @@ int reprogram_console_font(int fd, unsigned no_font_changes, bool* quadrants){
free(cfo.data);
return -1;
}
int r = reprogram_linux_font(fd, &cfo, &map, no_font_changes, quadrants);
int r = reprogram_linux_font(ti->linux_fb_fd, &cfo, &map, no_font_changes, quadrants);
free(cfo.data);
free(map.entries);
return r;

@ -15,7 +15,7 @@ bool is_linux_console(int fd);
// attempt to reprogram the console font, if necessary, to include all the
// quadrant glyphs. |quadrants| will be true if the quadrants are available,
// whether that required a reprogramming or not.
int reprogram_console_font(int fd, unsigned no_font_changes, bool* quadrants);
int reprogram_console_font(struct tinfo* ti, unsigned no_font_changes, bool* quadrants);
// if is_linux_console() returned true, call this to determine whether it is
// a drawable framebuffer console. do not call if not a verified console!

@ -587,7 +587,7 @@ apply_term_heuristics(tinfo* ti, const char* termname, queried_terminals_e qterm
}else{
termname = "Linux console";
}
reprogram_console_font(ti->linux_fb_fd, nonewfonts, &ti->caps.quadrants);
reprogram_console_font(ti, nonewfonts, &ti->caps.quadrants);
ti->caps.braille = false; // no caps.braille, no caps.sextants in linux console
#else
(void)nonewfonts;

Loading…
Cancel
Save