From 67cf4f0b4b1148dcfefe791481938b22d895a5da Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 15 Oct 2024 01:42:37 +0200 Subject: [PATCH] added some variables for font size --- src/screens.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/screens.c b/src/screens.c index 099a2970..7f105132 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4111,11 +4111,13 @@ static void DrawInfoScreen_GenericScreen(int screen_nr, int num_screens, int use if (info_mode == INFO_MODE_CREDITS || info_mode == INFO_MODE_PROGRAM) { + int font_width = getFontWidth(font_text); + int font_height = getFontHeight(font_text); int width = SXSIZE; int height = MENU_SCREEN_INFO_YBOTTOM - MENU_SCREEN_INFO_YSTART; - int chars = width / getFontWidth(font_text); - int lines = height / getFontHeight(font_text); - int padx = (width - chars * getFontWidth(font_text)) / 2; + int chars = width / font_width; + int lines = height / font_height; + int padx = (width - chars * font_width) / 2; int line_spacing = getMenuTextSpacing(spacing_line, font_text); int xstart = mSX + padx; int ystart = mSY + MENU_SCREEN_INFO_YSTART + getHeadlineSpacing(); -- 2.34.1