Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jan 1998 20:52:44 -0600 (CST)
From:      Joel Ray Holveck <joelh@gnu.org>
To:        dag-erli@ifi.uio.no
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Graphical screen saver
Message-ID:  <199801280252.UAA08226@detlev.UUCP>
In-Reply-To: <xzpyb01it8y.fsf@grjottunagard.ifi.uio.no> (dag-erli@ifi.uio.no)
References:   <xzpyb01it8y.fsf@grjottunagard.ifi.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help

> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801280252.UAA08226>