diff options
| author | Søren Schmidt <sos@FreeBSD.org> | 1998-09-17 19:40:30 +0000 |
|---|---|---|
| committer | Søren Schmidt <sos@FreeBSD.org> | 1998-09-17 19:40:30 +0000 |
| commit | d74e86d9e30043893d6b308468008b65640ddcae (patch) | |
| tree | 439d4ebd542a217dc6f3047108672c6338b9c1a2 /sys/dev/syscons/fade | |
| parent | 131bc817a0fad4a77853622429ae7652143031f1 (diff) | |
Notes
Diffstat (limited to 'sys/dev/syscons/fade')
| -rw-r--r-- | sys/dev/syscons/fade/fade_saver.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/dev/syscons/fade/fade_saver.c b/sys/dev/syscons/fade/fade_saver.c index 41176e76e092..0d31bd6de526 100644 --- a/sys/dev/syscons/fade/fade_saver.c +++ b/sys/dev/syscons/fade/fade_saver.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: fade_saver.c,v 1.13 1998/09/15 18:16:39 sos Exp $ */ #include <sys/param.h> @@ -44,26 +44,23 @@ static void fade_saver(int blank) { static int count = 0; + u_char pal[256*3]; int i; if (blank) { scrn_blanked = 1; + cur_console->status |= SAVER_RUNNING; switch (crtc_type) { case KD_VGA: if (count < 64) { - outb(PIXMASK, 0xFF); /* no pixelmask */ - outb(PALWADR, 0x00); - outb(PALDATA, 0); - outb(PALDATA, 0); - outb(PALDATA, 0); - for (i = 3; i < 768; i++) { - if (palette[i] - count > 15) - outb(PALDATA, palette[i]-count); + pal[0] = pal[1] = pal[2] = 0; + for (i = 3; i < 256*3; i++) { + if (palette[i] - count > 60) + pal[i] = palette[i] - count; else - outb(PALDATA, 15); + pal[i] = 60; } - inb(crtc_addr+6); /* reset flip/flop */ - outb(ATC, 0x20); /* enable palette */ + load_palette(cur_console, pal); count++; } break; @@ -100,6 +97,7 @@ fade_saver(int blank) default: break; } + cur_console->status &= ~SAVER_RUNNING; scrn_blanked = 0; } } |
