1
0
Fork 0

Use default attribute behavior of ANSI.SYS in the console device. Fixes scrolling issues. Anything that wants non-ANSI behavior may not display as intended with the internal DOS, same as real DOS when ANSI.SYS is loaded.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4005
This commit is contained in:
ripsaw8080 2017-01-15 16:01:34 +00:00
parent c4ed80ca35
commit d16a138ac7

View file

@ -132,8 +132,7 @@ bool device_CON::Write(Bit8u * data,Bit16u * size) {
/* expand tab if not direct output */
page = real_readb(BIOSMEM_SEG,BIOSMEM_CURRENT_PAGE);
do {
if(ansi.enabled) INT10_TeletypeOutputAttr(' ',ansi.attr,true);
else INT10_TeletypeOutput(' ',7);
INT10_TeletypeOutputAttr(' ',ansi.enabled?ansi.attr:7,true);
col=CURSOR_POS_COL(page);
} while(col%8);
lastwrite = data[count++];
@ -141,12 +140,10 @@ 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')) {
if(ansi.enabled) INT10_TeletypeOutputAttr('\r',ansi.attr,true);
else INT10_TeletypeOutput('\r',7);
INT10_TeletypeOutputAttr('\r',ansi.enabled?ansi.attr:7,true);
}
/* use ansi attribute if ansi is enabled, otherwise use DOS default attribute*/
if(ansi.enabled) INT10_TeletypeOutputAttr(data[count],ansi.attr,true);
else INT10_TeletypeOutput(data[count],7);
INT10_TeletypeOutputAttr(data[count],ansi.enabled?ansi.attr:7,true);
lastwrite = data[count++];
continue;
}