From 2b448f8d3d038e8bdec92cdd7e5739d9d0ca096e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Mon, 27 Mar 2006 19:31:54 +0000 Subject: [PATCH] respect maximal page in INT10_WriteChar when in graphics mode Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2557 --- src/ints/int10_char.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ints/int10_char.cpp b/src/ints/int10_char.cpp index 011c02e5..8dda0539 100644 --- a/src/ints/int10_char.cpp +++ b/src/ints/int10_char.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: int10_char.cpp,v 1.46 2006-02-24 20:42:15 c2woody Exp $ */ +/* $Id: int10_char.cpp,v 1.47 2006-03-27 19:31:54 c2woody Exp $ */ /* Character displaying moving functions */ @@ -516,6 +516,18 @@ void WriteChar(Bit16u col,Bit16u row,Bit8u page,Bit8u chr,Bit8u attr,bool useatt } void INT10_WriteChar(Bit8u chr,Bit8u attr,Bit8u page,Bit16u count,bool showattr) { + if (CurMode->type!=M_TEXT) { + switch (machine) { + case MCH_VGA: + page%=CurMode->ptotal; + break; + case MCH_CGA: + case MCH_PCJR: + page=0; + break; + } + } + Bit8u cur_row=CURSOR_POS_ROW(page); Bit8u cur_col=CURSOR_POS_COL(page); BIOS_NCOLS;BIOS_NROWS;