From edd8c28aba2d6461126ad7bd715ceca23897ddc1 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Mon, 9 Feb 2015 07:18:58 +0000
Subject: [PATCH] No longer change the font back to CP437.  Instead, set the
 graphics set to NULL and enable the new XLAT feature.

Also, enable XLAT when drawing the status bar.

This eliminates the background being "garbage" when pop-ups are displayed.
---
 src/syncterm/term.c     |  2 ++
 src/syncterm/uifcinit.c | 10 +++-------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/syncterm/term.c b/src/syncterm/term.c
index 96d90f0699..b3c56f781b 100644
--- a/src/syncterm/term.c
+++ b/src/syncterm/term.c
@@ -172,6 +172,7 @@ void update_status(struct bbslist *bbs, int speed, int ooii_mode)
 	now=time(NULL);
 	if(now==lastupd && speed==oldspeed)
 		return;
+	ciolib_xlat = TRUE;
 	lastupd=now;
 	oldspeed=speed;
 	timeon=now - bbs->connected;
@@ -226,6 +227,7 @@ void update_status(struct bbslist *bbs, int speed, int ooii_mode)
 	window(txtinfo.winleft,txtinfo.wintop,txtinfo.winright,txtinfo.winbottom);
 	gotoxy(txtinfo.curx,txtinfo.cury);
 	hold_update=olddmc;
+	ciolib_xlat = FALSE;
 }
 
 #if defined(_WIN32) && defined(_DEBUG) && defined(DUMP)
diff --git a/src/syncterm/uifcinit.c b/src/syncterm/uifcinit.c
index 2aa3b4ef35..c641028a76 100644
--- a/src/syncterm/uifcinit.c
+++ b/src/syncterm/uifcinit.c
@@ -13,7 +13,6 @@
 
 uifcapi_t uifc; /* User Interface (UIFC) Library API */
 static int uifc_initialized=0;
-int uifc_old_font=0;
 
 #define UIFC_INIT	(1<<0)
 #define WITH_SCRN	(1<<1)
@@ -28,12 +27,10 @@ int	init_uifc(BOOL scrn, BOOL bottom) {
 
     gettextinfo(&txtinfo);
 	if(!uifc_initialized) {
-		/* Get old font... */
-		uifc_old_font=getfont();
-		if(uifc_old_font >= 32 && uifc_old_font <= 36)
-			setfont(0, FALSE,1);
 		/* Set scrn_len to 0 to prevent textmode() call */
 		uifc.scrn_len=0;
+		ciolib_xlat = TRUE;
+		uifc.chars = NULL;
 		if((i=uifcini32(&uifc))!=0) {
 			fprintf(stderr,"uifc library init returned error %d\n",i);
 			return(-1);
@@ -75,8 +72,7 @@ void uifcbail(void)
 {
 	if(uifc_initialized) {
 		uifc.bail();
-		if(uifc_old_font != getfont())
-			setfont(uifc_old_font, FALSE,1);
+		ciolib_xlat = FALSE;
 	}
 	uifc_initialized=0;
 }
-- 
GitLab