From 2e939bf2b5a3a9013cc8e09d26e07bfd6944e383 Mon Sep 17 00:00:00 2001 From: Dan Werthimer Date: Thu, 7 Aug 2003 23:32:41 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2019 --- api/gutil.C | 7 ++++++- client/win/win_screensaver.cpp | 9 +++++++-- client/win/win_util.cpp | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/api/gutil.C b/api/gutil.C index 2c54e11b1d..71f3a7038b 100755 --- a/api/gutil.C +++ b/api/gutil.C @@ -1,3 +1,4 @@ +//#include // for ASSERT // The contents of this file are subject to the BOINC Public License // Version 1.0 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at @@ -445,6 +446,7 @@ int init_texture(char* filename) { glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR); err = glGetError(); if (err) return err; + //ASSERT(0); glTexImage2D( GL_TEXTURE_2D, 0, @@ -459,7 +461,10 @@ int init_texture(char* filename) { pixels // dimension of PPM file MUST be power of 2 ); err = glGetError(); - if (err) return err; + if (err) { + fprintf(stderr, "glTexImage2D returned error # %d: %s\n", err, gluErrorString(err)); + return err; + } return 0; } struct Vertex diff --git a/client/win/win_screensaver.cpp b/client/win/win_screensaver.cpp index 60d5fecef9..cf6d5dafe9 100755 --- a/client/win/win_screensaver.cpp +++ b/client/win/win_screensaver.cpp @@ -93,8 +93,11 @@ void RunSaver( void ) { if(boinc_mutex != NULL && GetLastError() != ERROR_ALREADY_EXISTS) { CloseHandle(boinc_mutex); // Get the path to the client - UtilGetRegStr( "ClientPath", client_path ); - UtilGetRegStr( "ClientDir", client_dir ); + if (!UtilGetRegStr( "ClientPath", client_path ) || + UtilGetRegStr( "ClientDir", client_dir )) + { + return /* error */; + } memset( &process_info, 0, sizeof( process_info ) ); memset( &startup_info, 0, sizeof( startup_info ) ); @@ -112,6 +115,8 @@ void RunSaver( void ) { client_dir, // start in the standard client directory &startup_info, &process_info ); + // wait up to 3 seconds for BOINC to start + WaitForInputIdle(process_info.hProcess, 3000); } BOINC_SS_START_MSG = RegisterWindowMessage( START_SS_MSG ); diff --git a/client/win/win_util.cpp b/client/win/win_util.cpp index a578aec82a..fc60914fb0 100755 --- a/client/win/win_util.cpp +++ b/client/win/win_util.cpp @@ -144,6 +144,8 @@ int UtilGetRegStr(char *name, char *str) DWORD size = 128; HKEY boinc_key; + *str = 0; + if ( OSVersion == OS_WIN95 ) { error = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\BOINC", 0, KEY_ALL_ACCESS, &boinc_key );