From: John Hodge Date: Sat, 20 Aug 2011 10:33:32 +0000 (+0800) Subject: Kernel - Attempting to fix scroll redraw issue X-Git-Tag: rel0.11~145 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=d479cee1b9f03381f4e0f3ec9aa9b5cd1240f004;p=tpg%2Facess2.git Kernel - Attempting to fix scroll redraw issue --- diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 8a3bd26f..1bf3dd6a 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -1373,6 +1373,7 @@ void VT_int_ScrollText(tVTerm *Term, int Count) { int base; if(Count > Term->ScrollHeight) Count = Term->ScrollHeight; +// Debug("Scroll: Count = %i", Count); base = Term->TextWidth*(Term->ScrollTop + Term->ScrollHeight - Count); len = Term->TextWidth*(Term->ScrollHeight - Count); @@ -1385,8 +1386,8 @@ void VT_int_ScrollText(tVTerm *Term, int Count) // Clear last rows for( i = 0; i < Term->TextWidth*Count; i ++ ) { - Term->AltBuf[ base + i ].Ch = 0; - Term->AltBuf[ base + i ].Colour = Term->CurColour; + buf[ base + i ].Ch = 0; + buf[ base + i ].Colour = Term->CurColour; } // Update Screen @@ -1395,7 +1396,6 @@ void VT_int_ScrollText(tVTerm *Term, int Count) Term->AltWritePos = Term->TextWidth*(Term->ScrollTop + Term->ScrollHeight - Count); else Term->WritePos = Term->ViewPos + Term->TextWidth*(Term->ScrollTop + Term->ScrollHeight - Count); -// Log_Debug("VTerm", "Term->WritePos = %i/%i = %i", Term->WritePos, Term->TextWidth, Term->WritePos/Term->TextWidth); for( i = 0; i < Count; i ++ ) { VT_int_UpdateScreen( Term, 0 ); @@ -1421,8 +1421,8 @@ void VT_int_ScrollText(tVTerm *Term, int Count) // Clear preceding rows for( i = 0; i < Term->TextWidth*Count; i ++ ) { - Term->AltBuf[ i ].Ch = 0; - Term->AltBuf[ i ].Colour = Term->CurColour; + buf[ i ].Ch = 0; + buf[ i ].Colour = Term->CurColour; } VT_int_ScrollFramebuffer( Term, -Count ); diff --git a/Modules/x86/VGAText/vga.c b/Modules/x86/VGAText/vga.c index e9263130..1ae1ece6 100644 --- a/Modules/x86/VGAText/vga.c +++ b/Modules/x86/VGAText/vga.c @@ -230,10 +230,10 @@ void VGA_int_SetCursor(Sint16 x, Sint16 y) int pos = x+y*VGA_WIDTH; if(x == -1 || y == -1) pos = -1; - outb(0x3D4, 14); - outb(0x3D5, pos >> 8); - outb(0x3D4, 15); - outb(0x3D5, pos); + outb(0x3D4, 14); + outb(0x3D5, pos >> 8); + outb(0x3D4, 15); + outb(0x3D5, pos); } void VGA_2D_Fill(void *Ent, Uint16 X, Uint16 Y, Uint16 W, Uint16 H, Uint32 Colour)