From 5992effd388cbab3e35750c4946a4dfff4c483af Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 11 Aug 2021 14:39:51 -0400 Subject: [PATCH] reprogram_console_font: take entire tinfo --- src/lib/linux.c | 4 ++-- src/lib/linux.h | 2 +- src/lib/termdesc.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/linux.c b/src/lib/linux.c index bcd86861c..bf38ff336 100644 --- a/src/lib/linux.c +++ b/src/lib/linux.c @@ -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; diff --git a/src/lib/linux.h b/src/lib/linux.h index 7d42303f8..83dc321a4 100644 --- a/src/lib/linux.h +++ b/src/lib/linux.h @@ -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! diff --git a/src/lib/termdesc.c b/src/lib/termdesc.c index 0c52c7e91..61e5cfc8c 100644 --- a/src/lib/termdesc.c +++ b/src/lib/termdesc.c @@ -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;