http://apple.doit.wisc.edu/mirrors/amug/linux/linuxppc/sources/tarballs/xscreensaver...
[xscreensaver] / driver / prefs.c
index 306e694a09a1fc5453c52a5e82a3b7e1e913bc20..cdf957961696a919868ac0184582054114d1e430 100644 (file)
@@ -174,6 +174,7 @@ static const char * const prefs[] = {
   "sgiSaverExtension",
   "mitSaverExtension",
   "xidleExtension",
+  "procInterrupts",
   "overlayStderr",
   "overlayTextBackground",     /* not saved -- X resources only */
   "overlayTextForeground",     /* not saved -- X resources only */
@@ -633,6 +634,7 @@ write_init_file (saver_preferences *p, const char *version_string)
       CHECK("sgiSaverExtension")type = pref_bool, b=p->use_sgi_saver_extension;
       CHECK("mitSaverExtension")type = pref_bool, b=p->use_mit_saver_extension;
       CHECK("xidleExtension")  type = pref_bool, b = p->use_xidle_extension;
+      CHECK("procInterrupts")  type = pref_bool, b = p->use_proc_interrupts;
       CHECK("overlayStderr")   type = pref_bool, b = overlay_stderr_p;
       CHECK("overlayTextBackground") continue;  /* don't save */
       CHECK("overlayTextForeground") continue;  /* don't save */
@@ -792,12 +794,12 @@ load_init_file (saver_preferences *p)
                                                     "Boolean");
   p->use_sgi_saver_extension = get_boolean_resource ("sgiSaverExtension",
                                                     "Boolean");
+  p->use_proc_interrupts = get_boolean_resource ("procInterrupts", "Boolean");
 
   /* Throttle the various timeouts to reasonable values.
    */
   if (p->passwd_timeout <= 0) p->passwd_timeout = 30000;        /* 30 secs */
   if (p->timeout < 10000) p->timeout = 10000;                   /* 10 secs */
-  if (p->cycle < 0) p->cycle = 0;
   if (p->cycle != 0 && p->cycle < 2000) p->cycle = 2000;        /*  2 secs */
   if (p->pointer_timeout <= 0) p->pointer_timeout = 5000;       /*  5 secs */
   if (p->notice_events_timeout <= 0)
@@ -806,15 +808,7 @@ load_init_file (saver_preferences *p)
     p->fade_p = False;
   if (! p->fade_p) p->unfade_p = False;
 
-  if (p->verbose_p && !p->fading_possible_p && (p->fade_p || p->unfade_p))
-    {
-      fprintf (stderr, "%s: there are no PseudoColor or GrayScale visuals.\n",
-              blurb());
-      fprintf (stderr, "%s: ignoring the request for fading/unfading.\n",
-              blurb());
-    }
-
-  p->watchdog_timeout = p->cycle;
+  p->watchdog_timeout = p->cycle * 0.6;
   if (p->watchdog_timeout < 30000) p->watchdog_timeout = 30000;          /* 30 secs */
   if (p->watchdog_timeout > 3600000) p->watchdog_timeout = 3600000; /*  1 hr */