From 9f8df107e5b367ff87cfab722827b5e7315c41f7 Mon Sep 17 00:00:00 2001 From: Ulrich Hecht Date: Sun, 29 Jul 2018 13:40:48 +0200 Subject: [PATCH] basic: SCREEN: set font after resetting screen Unevenly sized fonts clip the text window by a few pixels. When the text screen is reset these window dimensions are preserved, and when a font that fits the screen resolution evenly is selected afterwards, it will be missing the clipped pixels and the screen will have one character less per line. Fixes lost characters when using SCREEN with the same mode already active and a non-default font selected. --- ttbasic/basic_video.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ttbasic/basic_video.cpp b/ttbasic/basic_video.cpp index 47551bb7..71f901fa 100644 --- a/ttbasic/basic_video.cpp +++ b/ttbasic/basic_video.cpp @@ -121,10 +121,10 @@ void SMALL iscreen() { vs23.reset(); - sc0.setFont(fonts[CONFIG.font]); if (scmode == m) { sc0.reset(); + sc0.setFont(fonts[CONFIG.font]); sc0.locate(0,0); sc0.cls(); sc0.show_curs(false); @@ -137,6 +137,7 @@ void SMALL iscreen() { // NTSCスクリーン設定 sc0.init(SIZE_LINE,CONFIG.NTSC, m - 1); + sc0.setFont(fonts[CONFIG.font]); sc0.cls(); sc0.show_curs(false); sc0.draw_cls_curs();