From 9379f8aa8e470e4ff4cc7441f43af221048b3642 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 31 Aug 2007 15:59:06 +0000 Subject: [PATCH] V6 graphics development svn path=/trunk/boinc/; revision=13500 --- clientscr/mac_saver_module.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clientscr/mac_saver_module.cpp b/clientscr/mac_saver_module.cpp index 6396621981..76e717a457 100755 --- a/clientscr/mac_saver_module.cpp +++ b/clientscr/mac_saver_module.cpp @@ -99,7 +99,7 @@ void strip_cr(char *buf); #define NOBANNERFREQUENCY 4 /* Times per second to call drawGraphics if no banner */ #define STATUSUPDATEINTERVAL 5 /* seconds between status display updates */ #define TASK_RUN_CHECK_PERIOD 5 /* Seconds between safety check that task is actually running */ -#define GFX_CHANGE_PERIOD 600 /* if > 1 CPUs, change screensaver every 600 secs */ +#define GFX_CHANGE_PERIOD 22 // 600 /* if > 1 CPUs, change screensaver every 600 secs */ enum SaverState { SaverState_Idle, @@ -490,6 +490,7 @@ OSStatus RPCThread(void* param) { int iIndex = 0; double percent_done; double launch_time = 0.0; + double last_change_time = 0.0; double last_run_check_time = 0.0; while (true) { @@ -587,12 +588,13 @@ OSStatus RPCThread(void* param) { } } #endif - if (launch_time && ((dtime() - launch_time) > GFX_CHANGE_PERIOD)) { + if (last_change_time && ((dtime() - last_change_time) > GFX_CHANGE_PERIOD)) { if (count_active_graphic_apps(results) > 1) { avoid_old_result_name = current_result_name; terminate_screensaver(graphics_app_pid); // waitpid test will clear graphics_app_pid and graphics_app_result_ptr } + last_change_time = dtime(); } } @@ -615,6 +617,7 @@ OSStatus RPCThread(void* param) { } else { gClientSaverStatus = SS_STATUS_ENABLED; launch_time = dtime(); + last_change_time = launch_time; last_run_check_time = launch_time; current_result_name = graphics_app_result_ptr->name; }