1
0
Fork 0

Use normal teletype function for non-ANSI output so the default attribute 7 applies only to graphics modes and existing attributes are not changed in text modes.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3912
This commit is contained in:
ripsaw8080 2015-05-13 01:24:56 +00:00
parent 5a7b43f704
commit 937dcdb1ee

View file

@ -129,9 +129,13 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
continue;
} else {
/* Some sort of "hack" now that '\n' doesn't set col to 0 (int10_char.cpp old chessgame) */
if((data[count] == '\n') && (lastwrite != '\r')) INT10_TeletypeOutputAttr('\r',ansi.attr,ansi.enabled);
if((data[count] == '\n') && (lastwrite != '\r')) {
if(ansi.enabled) INT10_TeletypeOutputAttr('\r',ansi.attr,true);
else INT10_TeletypeOutput('\r',7);
}
/* use ansi attribute if ansi is enabled, otherwise use DOS default attribute*/
INT10_TeletypeOutputAttr(data[count],ansi.enabled?ansi.attr:7,true);
if(ansi.enabled) INT10_TeletypeOutputAttr(data[count],ansi.attr,true);
else INT10_TeletypeOutput(data[count],7);
lastwrite = data[count++];
continue;
}