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:
parent
5a7b43f704
commit
937dcdb1ee
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue