From 2bada3655d7c7645e0876b6a138ebabb0d13eaa7 Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Thu, 3 Apr 2003 11:02:43 +0000 Subject: [PATCH] Fixed bug in dev_Con::write - use background attribute only if ansi is enabled. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@863 --- src/dos/dev_con.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/dos/dev_con.h b/src/dos/dev_con.h index 6059a861..1a0fb976 100644 --- a/src/dos/dev_con.h +++ b/src/dos/dev_con.h @@ -109,7 +109,7 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) { Bit16u count=0; Bitu i; Bit8s col,row; - static bool ansiwarned=false; + static bool ansi_enabled=false; while (*size>count) { if (!ansi.esc){ @@ -119,16 +119,17 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) { /* start the sequence */ ansi.esc=true; count++; - if(!ansiwarned) { + if(!ansi_enabled) { LOG(LOG_IOCTL,"ANSI sequences detected. enabling ansi support"); /* maybe LOG_MSG */ - ansiwarned=true; + ansi_enabled=true; } continue; } else { - INT10_TeletypeOutput(data[count],ansi.attr,true,0); - count++; - continue; + // pass attribute only if ansi is enabled + INT10_TeletypeOutput(data[count],ansi.attr,ansi_enabled,0); + count++; + continue; }; }; /* ansi.esc=true */