Kernel - Attempting to fix scroll redraw issue
authorJohn Hodge <[email protected]>
Sat, 20 Aug 2011 10:33:32 +0000 (18:33 +0800)
committerJohn Hodge <[email protected]>
Sat, 20 Aug 2011 10:33:32 +0000 (18:33 +0800)
Kernel/drv/vterm.c
Modules/x86/VGAText/vga.c

index 8a3bd26..1bf3dd6 100644 (file)
@@ -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 );
index e926313..1ae1ece 100644 (file)
@@ -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)

UCC git Repository :: git.ucc.asn.au