*** empty log message ***

svn path=/trunk/boinc_samples/; revision=11471
This commit is contained in:
David Anderson 2006-11-05 00:02:27 +00:00
parent ac5e0eade6
commit d51515f1f7
2 changed files with 12 additions and 31 deletions

View File

@ -185,3 +185,11 @@ David 26 Sept 2006
uppercase/
upper_case.C
David 4 Nov 2006
- uppercase: call boinc_graphics_possible() instead of
using a bunch of mysterious inline code.
This is supposed to be a good example, not a bad one.
uppercase/
upper_case.C

View File

@ -196,7 +196,6 @@ void worker() {
int main(int argc, char **argv) {
int i;
int retval = 0;
bool nographics_flag = false;
boinc_init_diagnostics(
BOINC_DIAG_DUMPCALLSTACKENABLED |
@ -206,30 +205,6 @@ int main(int argc, char **argv) {
BOINC_DIAG_REDIRECTSTDERR
);
// Write through to disk
setbuf(stderr, 0);
#ifdef _WIN32
// Attempt to load the dlls that are required to display graphics, if
// any of them fail do not start the application in graphics mode.
if (FAILED(__HrLoadAllImportsForDll("GDI32.dll"))) {
fprintf( stderr, "Failed to load GDI32.DLL...\n" );
nographics_flag = true;
}
if (FAILED(__HrLoadAllImportsForDll("OPENGL32.dll"))) {
fprintf( stderr, "Failed to load OPENGL32.DLL...\n" );
nographics_flag = true;
}
if (FAILED(__HrLoadAllImportsForDll("GLU32.dll"))) {
fprintf( stderr, "Failed to load GLU32.DLL...\n" );
nographics_flag = true;
}
#endif
// NOTE: if you change output here, remember to change the output that
// test_uc.py pattern-matches against.
for (i=0; i<argc; i++) {
if (!strcmp(argv[i], "-exit")) random_exit = true;
if (!strcmp(argv[i], "-crash")) random_crash = true;
@ -240,21 +215,19 @@ int main(int argc, char **argv) {
}
#ifdef BOINC_APP_GRAPHICS
if (boinc_graphics_possible()) {
#if defined(_WIN32) || defined(__APPLE__)
if (!nographics_flag) {
retval = boinc_init_graphics(worker);
}
#else
if (!nographics_flag) {
retval = boinc_init_graphics_lib(worker, argv[0]);
#endif
if (retval) exit(retval);
}
#endif
if (retval) exit(retval);
#else
retval = boinc_init();
if (retval) exit(retval);
worker();
#endif
}
#ifdef _WIN32