Skip to content

Commit

Permalink
basic: SCREEN: set font after resetting screen
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Hecht committed Jul 29, 2018
1 parent 50fee30 commit 9f8df10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ttbasic/basic_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit 9f8df10

Please sign in to comment.