X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffreeglut_init.c;h=9949138ddb535d7bc341987903e6dcad08c1f9ea;hb=e4aeaead5b7292e16223ed828b6ba4bc897e80c8;hp=d68341c0781fb4e9fb8552118d5b2210d514e808;hpb=fb2757eb06a0e50af5af9859875efb278949d92b;p=freeglut diff --git a/src/freeglut_init.c b/src/freeglut_init.c index d68341c..9949138 100644 --- a/src/freeglut_init.c +++ b/src/freeglut_init.c @@ -379,6 +379,10 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) char* displayName = NULL; int i, j, argc = *pargc; + if (pargc && *pargc && argv && *argv && **argv) + fgState.ProgramName = strdup (*argv); + else + fgState.ProgramName = strdup (""); /* * Do not allow multiple initialization of the library */ @@ -1076,42 +1080,42 @@ void FGAPIENTRY glutInitDisplayString( const char* displayMode ) break ; case 20 : /* "win32pdf": matches the Win32 Pixel Format Descriptor by number */ -#ifdef TARGET_HOST_WIN32 +#if TARGET_HOST_WIN32 #endif break ; case 21 : /* "xvisual": matches the X visual ID by number */ -#ifdef TARGET_HOST_UNIX_X11 +#if TARGET_HOST_UNIX_X11 #endif break ; case 22 : /* "xstaticgray": boolean indicating if the frame buffer configuration's X visual is of type StaticGray */ -#ifdef TARGET_HOST_UNIX_X11 +#if TARGET_HOST_UNIX_X11 #endif break ; case 23 : /* "xgrayscale": boolean indicating if the frame buffer configuration's X visual is of type GrayScale */ -#ifdef TARGET_HOST_UNIX_X11 +#if TARGET_HOST_UNIX_X11 #endif break ; case 24 : /* "xstaticcolor": boolean indicating if the frame buffer configuration's X visual is of type StaticColor */ -#ifdef TARGET_HOST_UNIX_X11 +#if TARGET_HOST_UNIX_X11 #endif break ; case 25 : /* "xpseudocolor": boolean indicating if the frame buffer configuration's X visual is of type PseudoColor */ -#ifdef TARGET_HOST_UNIX_X11 +#if TARGET_HOST_UNIX_X11 #endif break ; case 26 : /* "xtruecolor": boolean indicating if the frame buffer configuration's X visual is of type TrueColor */ -#ifdef TARGET_HOST_UNIX_X11 +#if TARGET_HOST_UNIX_X11 #endif break ; case 27 : /* "xdirectcolor": boolean indicating if the frame buffer configuration's X visual is of type DirectColor */ -#ifdef TARGET_HOST_UNIX_X11 +#if TARGET_HOST_UNIX_X11 #endif break ;