mirror of https://github.com/BOINC/boinc.git
Additional screensaver bug fix
svn path=/trunk/boinc/; revision=15877
This commit is contained in:
parent
ed8000459d
commit
440ae7d73d
|
@ -6773,8 +6773,8 @@ Rom 18 Aug 2008
|
|||
client/
|
||||
hostinfo_win.C
|
||||
|
||||
Rom 18 Aug 2008
|
||||
- SCR: Fix my checkin that causes the CPU util to spike on Macs and
|
||||
Rom & Charlie 18 Aug 2008
|
||||
- SCR: Fix 8/14 checkin that causes the CPU util to spike on Macs and
|
||||
possibly Windows.
|
||||
|
||||
clientscr/
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
// This file is part of BOINC.
|
||||
// Berkeley Open Infrastructure for Network Computing
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2008 University of California
|
||||
// Copyright (C) 2005 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
// as published by the Free Software Foundation,
|
||||
// either version 3 of the License, or (at your option) any later version.
|
||||
// This is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation;
|
||||
// either version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// BOINC is distributed in the hope that it will be useful,
|
||||
// This software is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
// To view the GNU Lesser General Public License visit
|
||||
// http://www.gnu.org/copyleft/lesser.html
|
||||
// or write to the Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
//
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -311,7 +313,6 @@ void *CScreensaver::DataManagementProc() {
|
|||
double launch_time = 0.0;
|
||||
double last_change_time = 0.0;
|
||||
double last_run_check_time = 0.0;
|
||||
time_t long_poll_timer = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
BOINCTRACE(_T("CScreensaver::DataManagementProc - Display screen saver loading message\n"));
|
||||
|
@ -324,7 +325,7 @@ void *CScreensaver::DataManagementProc() {
|
|||
#endif
|
||||
|
||||
while (true) {
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
// ***
|
||||
// *** Things that should be run frequently.
|
||||
// *** 4 times per second.
|
||||
|
@ -356,15 +357,14 @@ void *CScreensaver::DataManagementProc() {
|
|||
|
||||
#endif
|
||||
|
||||
boinc_sleep(0.25);
|
||||
}
|
||||
|
||||
// ***
|
||||
// *** Things that should be run frequently.
|
||||
// *** 1 time per second.
|
||||
// ***
|
||||
|
||||
if (time(0) > long_poll_timer) {
|
||||
long_poll_timer = time(0);
|
||||
|
||||
// Blank screen saver?
|
||||
if ((m_dwBlankScreen) && (time(0) > m_dwBlankTime)) {
|
||||
BOINCTRACE(_T("CScreensaver::DataManagementProc - Time to blank\n"));
|
||||
|
@ -447,7 +447,21 @@ void *CScreensaver::DataManagementProc() {
|
|||
previous_result_ptr = NULL;
|
||||
// waitpid test will clear m_hGraphicsApplication
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Safety check that task is actually running
|
||||
if (last_run_check_time && ((dtime() - last_run_check_time) > TASK_RUN_CHECK_PERIOD)) {
|
||||
if (FindProcessPID(NULL, ? ? ?) == 0) {
|
||||
terminate_screensaver(m_hGraphicsApplication, graphics_app_result_ptr);
|
||||
if (m_hGraphicsApplication == 0) {
|
||||
graphics_app_result_ptr = NULL;
|
||||
// Save previous_result and previous_result_ptr for get_random_graphics_app() call
|
||||
} else {
|
||||
// waitpid test will clear m_hGraphicsApplication and graphics_app_result_ptr
|
||||
}
|
||||
previous_result_ptr = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (last_change_time && ((dtime() - last_change_time) > GFX_CHANGE_PERIOD)) {
|
||||
if (count_active_graphic_apps(results, previous_result_ptr) > 0) {
|
||||
if (previous_result_ptr) {
|
||||
|
@ -534,11 +548,5 @@ void *CScreensaver::DataManagementProc() {
|
|||
}
|
||||
}
|
||||
#endif // ! SIMULATE_NO_GRAPHICS
|
||||
}
|
||||
|
||||
// Only loop through the data management proc 4 times a second.
|
||||
//
|
||||
boinc_sleep(0.25);
|
||||
|
||||
} // end while(true)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue