AmendHub

Download:

jcs

/

subtext

/

amendments

/

171

console: Ensure port is set before redrawing


jcs made amendment 171 over 2 years ago
--- console.c Tue Jun 21 16:29:45 2022 +++ console.c Thu Jun 23 14:01:25 2022 @@ -398,11 +398,15 @@ void console_redraw(struct console *console, short force) { Rect chunk; + GrafPtr old_port; short n, nsize, cell, curbold = -1, line, off, c, firstdirty; unsigned char curattr, a; nsize = console->ncolumns * console->nlines; + GetPort(&old_port); + SetPort(console->win); + TextFont(TEXT_FONT); TextSize(TEXT_SIZE); @@ -470,6 +474,7 @@ console_redraw(struct console *console, short force) InvertRect(&chunk); ValidRect(&console->win->portRect); + SetPort(old_port); } void