DragonFly BSD
DragonFly submit List (threaded) for 2005-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[PATCH] syscons history buffer size


From: Alexey Slynko <slynko@xxxxxxxxx>
Date: Sun, 21 Aug 2005 20:55:28 +0400

Hi,

this patch fix history buffer size reset to default value, when videomode changed by vidcontrol

Index: sys/dev/misc/syscons/scvidctl.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/misc/syscons/scvidctl.c,v
retrieving revision 1.11
diff -u -r1.11 scvidctl.c
--- sys/dev/misc/syscons/scvidctl.c	17 Jul 2005 16:50:40 -0000	1.11
+++ sys/dev/misc/syscons/scvidctl.c	21 Aug 2005 16:31:59 -0000
@@ -54,6 +54,7 @@
     video_info_t info;
     u_char *font;
     int prev_ysize;
+    int new_ysize;
     int error;
 
     if ((*vidsw[scp->sc->adapter]->get_info)(scp->sc->adp, mode, &info))
@@ -108,9 +109,12 @@
     }
 
     /* set up scp */
+    new_ysize = 0;
 #ifndef SC_NO_HISTORY
-    if (scp->history != NULL)
+    if (scp->history != NULL) {
 	sc_hist_save(scp);
+	new_ysize = sc_vtb_rows(scp->history); 
+    }
 #endif
     prev_ysize = scp->ysize;
     /*
@@ -136,7 +140,7 @@
     sc_alloc_cut_buffer(scp, FALSE);
 #endif
 #ifndef SC_NO_HISTORY
-    sc_alloc_history_buffer(scp, 0, prev_ysize, FALSE);
+    sc_alloc_history_buffer(scp, new_ysize, prev_ysize, FALSE);
 #endif
     crit_exit();
 
@@ -232,6 +236,7 @@
     video_info_t info;
     u_char *font;
     int prev_ysize;
+    int new_ysize;
     int error;
 
     if ((*vidsw[scp->sc->adapter]->get_info)(scp->sc->adp, scp->mode, &info))
@@ -322,9 +327,12 @@
 #endif
 
     /* set up scp */
+    new_ysize = 0;
 #ifndef SC_NO_HISTORY
-    if (scp->history != NULL)
+    if (scp->history != NULL) {
 	sc_hist_save(scp);
+	new_ysize = sc_vtb_rows(scp->history);
+    }
 #endif
     prev_ysize = scp->ysize;
     scp->status |= (UNKNOWN_MODE | PIXEL_MODE | MOUSE_HIDDEN);
@@ -343,7 +351,7 @@
     sc_alloc_cut_buffer(scp, FALSE);
 #endif
 #ifndef SC_NO_HISTORY
-    sc_alloc_history_buffer(scp, 0, prev_ysize, FALSE);
+    sc_alloc_history_buffer(scp, new_ysize, prev_ysize, FALSE);
 #endif
     crit_exit();
 


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]