Commit 5cdaa80e authored by Rom Walton's avatar Rom Walton

- SCR: Fix a few bugs with the last checkin.

    
    clientscr/
        screensaver.cpp

svn path=/trunk/boinc/; revision=13497
parent f818d849
......@@ -8155,7 +8155,6 @@ Charlie 27 Aug 2007
lib/
shmem.C,h
Rom 28 Aug 2007
- SCR: Move more code into the shared code module
......@@ -8163,6 +8162,14 @@ Rom 28 Aug 2007
screensaver.cpp, .h
screensaver_win.cpp
Rom 28 Aug 2007
- Tag for 6.1.0 release, all platforms
boinc_core_release_6_1_0
/
configure.ac
version.h
Charlie 28 Aug 2007
- Mac V6 GFX: Create same shmem file name as for Windows, instead of
"gfx_mmap_file".
......@@ -8210,4 +8217,9 @@ Charlie 29 Aug 2007
clientgui/
ViewWorkGrid.cpp
\ No newline at end of file
Rom 29 Aug 2007
- SCR: Fix a few bugs with the last checkin.
clientscr/
screensaver.cpp
......@@ -36,7 +36,7 @@ bool is_task_active(RESULT* result) {
bool bIsDownloaded = CPU_SCHED_SCHEDULED == result->scheduler_state;
bool bIsExecuting = result->active_task;
if (!bIsActive || !bIsDownloaded || !bIsExecuting)
if (bIsActive && bIsDownloaded && bIsExecuting)
return true;
return false;
}
......@@ -45,21 +45,40 @@ bool is_task_active(RESULT* result) {
// Choose a random graphics application out of the vector.
//
RESULT* get_random_graphics_app(RESULTS& results) {
RESULT* rp = NULL;
unsigned int i = 0;
unsigned int graphics_app_count = 0;
unsigned int random_selection = 0;
unsigned int current_counter = 0;
BOINCTRACE(_T("get_random_graphics_app -- Function Start\n"));
// Count the number of graphics apps
for (i = 0; i < results.results.size(); i++) {
if (!is_task_active(results.results[i])) continue;
BOINCTRACE(_T("get_random_graphics_app -- active task detected\n"));
BOINCTRACE(
_T("get_random_graphics_app -- name = '%s', path = '%s'\n"),
results.results[i]->name.c_str(), results.results[i]->graphics_exec_path.c_str()
);
if (results.results[i]->graphics_exec_path.size() > 0) {
BOINCTRACE(_T("get_random_graphics_app -- active task detected w/graphics\n"));
graphics_app_count++;
}
}
BOINCTRACE(_T("get_random_graphics_app -- graphics_app_count = '%d'\n"), graphics_app_count);
// If no graphics app was found, return NULL
if (0 == graphics_app_count) {
goto CLEANUP;
}
// Choose which application to display.
random_selection = rand() % graphics_app_count;
if (0 == random_selection) {
random_selection = 1;
}
BOINCTRACE(_T("get_random_graphics_app -- random_selection = '%d'\n"), random_selection);
// Lets find the choosen graphics application.
for (i = 0; i < results.results.size(); i++) {
......@@ -67,12 +86,15 @@ RESULT* get_random_graphics_app(RESULTS& results) {
if (results.results[i]->graphics_exec_path.size() > 0) {
current_counter++;
if (current_counter == random_selection) {
return results.results[i];
rp = results.results[i];
}
}
}
return NULL;
CLEANUP:
BOINCTRACE(_T("get_random_graphics_app -- Function End\n"));
return rp;
}
......
......@@ -9,7 +9,7 @@ dnl not sure exactly what the minimum version is (but 2.13 wont work)
AC_PREREQ(2.57)
dnl Set the BOINC version here. You can also use the set-version script.
AC_INIT(BOINC, 5.11.0)
AC_INIT(BOINC, 6.1.0)
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
......
......@@ -4,16 +4,16 @@
#define BOINC_VERSION_H
/* Major part of BOINC version number */
#define BOINC_MAJOR_VERSION 5
#define BOINC_MAJOR_VERSION 6
/* Minor part of BOINC version number */
#define BOINC_MINOR_VERSION 11
#define BOINC_MINOR_VERSION 1
/* Release part of BOINC version number */
#define BOINC_RELEASE 0
/* String representation of BOINC version number */
#define BOINC_VERSION_STRING "5.11.0"
#define BOINC_VERSION_STRING "6.1.0"
#if (defined(_WIN32) || defined(__APPLE__))
/* Name of package */
......@@ -26,13 +26,13 @@
#define PACKAGE_NAME "BOINC"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "BOINC 5.11.0"
#define PACKAGE_STRING "BOINC 6.1.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "boinc"
/* Define to the version of this package. */
#define PACKAGE_VERSION "5.11.0"
#define PACKAGE_VERSION "6.1.0"
#endif /* #if (defined(_WIN32) || defined(__APPLE__)) */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment