From 01f66ad866d56ef3b82ecc24cc322e77bf95daf7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 13 Sep 2004 23:17:16 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4195 --- checkin_notes | 9 +++++++++ client/app_graphics.C | 5 ++--- client/ss_logic.C | 23 ++++++++--------------- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/checkin_notes b/checkin_notes index 7c89e52459..57c1ad8dfd 100755 --- a/checkin_notes +++ b/checkin_notes @@ -17380,3 +17380,12 @@ David 13 Sept 2004 user/ account_created.php mail_passwd.php + +David 13 Sept 2004 + - small changes to screensaver logic, try to fix Rom's 2-CPU bug + + client/ + app_graphics.C + ss_logic.C + + diff --git a/client/app_graphics.C b/client/app_graphics.C index 07e33400c6..83a07cdb37 100644 --- a/client/app_graphics.C +++ b/client/app_graphics.C @@ -53,14 +53,13 @@ void ACTIVE_TASK::check_graphics_mode_ack() { } } -// return an app (if any) with given requested mode +// return the active task that's currently acting as screensaver // ACTIVE_TASK* ACTIVE_TASK_SET::get_ss_app() { unsigned int i; - ACTIVE_TASK* atp; for (i=0; iis_ss_app) { return atp; } diff --git a/client/ss_logic.C b/client/ss_logic.C index 555474df85..1614b404e0 100644 --- a/client/ss_logic.C +++ b/client/ss_logic.C @@ -70,17 +70,13 @@ void SS_LOGIC::stop_ss() { gstate.active_tasks.restore_apps(); } -// called to cause poll() to choose a new app to do screensaver graphics +// If an app is acting as screensaver, tell it to stop. // void SS_LOGIC::reset() { - ACTIVE_TASK* atp; - if (do_ss) { - atp = gstate.active_tasks.get_ss_app(); - if (atp) { - atp->request_graphics_mode(MODE_HIDE_GRAPHICS); - atp->is_ss_app = false; - } - do_boinc_logo_ss = false; + ACTIVE_TASK* atp = gstate.active_tasks.get_ss_app(); + if (atp) { + atp->request_graphics_mode(MODE_HIDE_GRAPHICS); + atp->is_ss_app = false; } } @@ -99,6 +95,7 @@ void SS_LOGIC::poll() { if (!do_ss) return; if (gstate.activities_suspended) { + reset(); do_boinc_logo_ss = true; strcpy(ss_msg, "BOINC activities suspended"); return; @@ -109,11 +106,7 @@ void SS_LOGIC::poll() { // if (blank_time && (time(0) > blank_time)) { if (!do_blank) { - atp = gstate.active_tasks.get_ss_app(); - if (atp) { - atp->request_graphics_mode(MODE_HIDE_GRAPHICS); - atp->is_ss_app = false; - } + reset(); do_blank = true; } do_boinc_logo_ss = false; @@ -128,7 +121,7 @@ void SS_LOGIC::poll() { if (time(0)>ack_deadline) { do_boinc_logo_ss = true; strcpy(ss_msg, "App can't display graphics"); - atp->graphics_mode_acked = MODE_UNSUPPORTED; + atp->request_graphics_mode(MODE_HIDE_GRAPHICS); atp->is_ss_app = false; } }