Skip to content

Commit 9f8df10

Browse files
author
Ulrich Hecht
committed
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.
1 parent 50fee30 commit 9f8df10

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ttbasic/basic_video.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ void SMALL iscreen() {
121121

122122
vs23.reset();
123123

124-
sc0.setFont(fonts[CONFIG.font]);
125124

126125
if (scmode == m) {
127126
sc0.reset();
127+
sc0.setFont(fonts[CONFIG.font]);
128128
sc0.locate(0,0);
129129
sc0.cls();
130130
sc0.show_curs(false);
@@ -137,6 +137,7 @@ void SMALL iscreen() {
137137
// NTSCスクリーン設定
138138
sc0.init(SIZE_LINE,CONFIG.NTSC, m - 1);
139139

140+
sc0.setFont(fonts[CONFIG.font]);
140141
sc0.cls();
141142
sc0.show_curs(false);
142143
sc0.draw_cls_curs();

0 commit comments

Comments
 (0)