From 72f57de1fb702f5507f4b154ff272e945805cfb4 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 7 Apr 1995 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1995-04-07 --- pc/devvga.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pc/devvga.c b/pc/devvga.c index 4e21f7190ce03f4deb770655d63cf2fceff72ba0..8ada001bd678096dd29f1f88caa78650861c2c56 100644 --- a/pc/devvga.c +++ b/pc/devvga.c @@ -328,12 +328,18 @@ vgactl(char *arg) y = strtoul(field[2], 0, 0); /* see if it fits in the usual place */ - if(x <= 2*Footprint){ + if(x <= Footprint){ screenmem = SCREENMEM; - if(x == 0) + if(x == 0){ footprint = Footprint; - else + footshift = Footshift; + } else { footprint = x; + for(n = 0; n < 31; n++) + if((1<= footprint) + break; + footshift = n; + } gscreen.base = (void*)screenmem; return; } @@ -357,6 +363,10 @@ vgactl(char *arg) screenmem = y; gscreen.base = (void*)y; footprint = x; + for(n = 0; n < 31; n++) + if((1<= footprint) + break; + footshift = n; return; }