1
0
Fork 0

Change the console device to use the DOS default attribute of 7 when ANSI is not active. Fixes glitched text in Space Pilot, and generally improves compatibility of console text output in graphics modes.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3880
This commit is contained in:
ripsaw8080 2015-01-06 17:16:00 +00:00
parent 92ca5488b9
commit d2209e10b5

View file

@ -130,8 +130,8 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
} 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);
/* pass attribute only if ansi is enabled */
INT10_TeletypeOutputAttr(data[count],ansi.attr,ansi.enabled);
/* use ansi attribute if ansi is enabled, otherwise use DOS default attribute*/
INT10_TeletypeOutputAttr(data[count],ansi.enabled?ansi.attr:7,true);
lastwrite = data[count++];
continue;
}