From owner-freebsd-hackers Tue Jan 27 18:57:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA21324 for hackers-outgoing; Tue, 27 Jan 1998 18:57:15 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from wcc.wcc.net (wcc.wcc.net [208.6.232.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA21279 for ; Tue, 27 Jan 1998 18:56:55 -0800 (PST) (envelope-from piquan@wcc.wcc.net) Received: from detlev.UUCP (ppp89.wcc.net [208.6.232.89]) by wcc.wcc.net (8.8.7/8.8.7) with ESMTP id UAA03255; Tue, 27 Jan 1998 20:53:20 -0600 (CST) Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.7) id UAA08226; Tue, 27 Jan 1998 20:52:44 -0600 (CST) (envelope-from joelh) Date: Tue, 27 Jan 1998 20:52:44 -0600 (CST) Message-Id: <199801280252.UAA08226@detlev.UUCP> To: dag-erli@ifi.uio.no CC: hackers@FreeBSD.ORG In-reply-to: (dag-erli@ifi.uio.no) Subject: Re: Graphical screen saver From: Joel Ray Holveck Reply-to: joelh@gnu.org References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > The source is in /pub/FreeBSD/incoming/logo_saver.tgz on wcarchive. > You'll need to patch syscons.c to make it work; a unified diff and > rudimentary installation instructions are included in the tarball. > As always, I appreciate feedback of any kind... I haven't compiled it yet, but here's my thoughts. If we're going to do start doing graphical screensavers, then I suggest making the mechanism more general, rather than requiring a separate timeout. To this end, I recommend adding a variable whereby the screensaver is responsible for letting syscons know if the current mode is known to it. The new variable is scrn_saver_mode. The screen saver is responsible for setting it when it changes the mode, and setting it to 0 when it unblanks the screen. (The latter task should probably be relegated to syscons.) I haven't tested this yet; I'm recompiling now. If all goes well, then I should have a screensaver ready hopefully tonight. Happy hacking, joelh --- /usr/src/sys/i386/isa/syscons.c.ctm Tue Jan 20 00:09:06 1998 +++ /usr/src/sys/i386/isa/syscons.c Tue Jan 27 20:33:34 1998 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1992-1997 Søren Schmidt + * Copyright (c) 1992-1998 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -135,6 +135,7 @@ static int delayed_next_scr = FALSE; static long scrn_blank_time = 0; /* screen saver timeout value */ int scrn_blanked = 0; /* screen saver active flag */ + int scrn_saver_mode = 0; static long scrn_time_stamp; u_char scr_map[256]; u_char scr_rmap[256]; @@ -2163,7 +2164,8 @@ } /* should we just return ? */ - if ((scp->status&UNKNOWN_MODE) || blink_in_progress || switch_in_progress) { + if (((scp->status&UNKNOWN_MODE)&&(scp->mode!=scrn_saver_mode)) + || blink_in_progress || switch_in_progress) { timeout(scrn_timer, NULL, hz / 10); splx(s); return; -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped