From dd2211f1f66cd932e54b63b561365a20dcf6c7e9 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Sat, 19 Jan 2008 04:11:20 +0000 Subject: [PATCH] GFX API: change args passed to GlutInit() to be original unmodified args which were passed to the application, as specified in the man page svn path=/trunk/boinc/; revision=14602 --- api/graphics2_unix.C | 10 ++++------ checkin_notes | 7 +++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/api/graphics2_unix.C b/api/graphics2_unix.C index ff84a08a95..e83696cbc0 100644 --- a/api/graphics2_unix.C +++ b/api/graphics2_unix.C @@ -153,10 +153,8 @@ static void make_window() { } } -static void boinc_glut_init() { - const char* args[2] = {"BOINC", NULL}; - int one=1; - +static void boinc_glut_init(int argc, char** argv) { + int arg_count = argc; win = 0; FILE *f = boinc_fopen("gfx_info", "r"); @@ -166,7 +164,7 @@ static void boinc_glut_init() { fclose(f); } - glutInit (&one, (char**)args); + glutInit (&arg_count, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ALPHA); glutInitWindowPosition(xpos, ypos); glutInitWindowSize(width, height); @@ -187,7 +185,7 @@ void boinc_graphics_loop(int argc, char** argv) { fullscreen = true; } } - boinc_glut_init(); + boinc_glut_init(argc, argv); make_window(); glutTimerFunc(TIMER_INTERVAL_MSEC, timer_handler, 0); #ifdef __APPLE__ diff --git a/checkin_notes b/checkin_notes index 2356465d1c..806df07234 100644 --- a/checkin_notes +++ b/checkin_notes @@ -715,3 +715,10 @@ Rom Jan 18 2008 win_build/installerv2/redist/Windows/x64/ boinccas.dll boinccas95.dll + +Charlie Jan 18 2008 + GFX API: change args passed to GlutInit() to be original unmodified args + which were passed to the application, as specified in the man page. + + api/ + graphics2_unix.C