X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=freeglut-1.3%2Ffreeglut_init.c;h=7fa7afa82831f1c7df493109be1710088732c715;hb=4718a4ac2bad82816c5169dcdd16967d058d6810;hp=2b47456e6a24212193f34003b28b8066e1cc61ef;hpb=a82e219413778d1fd55d270af98e9ad6a97e25a0;p=freeglut diff --git a/freeglut-1.3/freeglut_init.c b/freeglut-1.3/freeglut_init.c index 2b47456..7fa7afa 100644 --- a/freeglut-1.3/freeglut_init.c +++ b/freeglut-1.3/freeglut_init.c @@ -32,7 +32,7 @@ #define G_LOG_DOMAIN "freeglut-init" #include "../include/GL/freeglut.h" -#include "../include/GL/freeglut_internal.h" +#include "freeglut_internal.h" /* * TODO BEFORE THE STABLE RELEASE: @@ -366,6 +366,11 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) * Grab the environment variable indicating the X display to use. * This is harmless under Win32, so let's let it stay here... */ +#if TARGET_HOST_WIN32 + if ( !getenv ( "DISPLAY" ) ) + displayName = strdup ( "" ) ; + else +#endif displayName = strdup( getenv( "DISPLAY" ) ); /* @@ -608,7 +613,7 @@ void FGAPIENTRY glutInitWindowSize( int width, int height ) /* * Sets the default display mode for all new windows */ -void FGAPIENTRY glutInitDisplayMode( int displayMode ) +void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode ) { /* * We will make use of this value when creating a new OpenGL context... @@ -816,7 +821,7 @@ void FGAPIENTRY glutInitDisplayString( char* displayMode ) * Grab the value string that must follow the comparison operator... */ if( comparison != FG_NONE && i < (gint) strlen( scanner->value.v_identifier ) ) - valueString = g_strdup( scanner->value.v_identifier + i ); + valueString = strdup( scanner->value.v_identifier + i ); /* * If there was a value string, convert it to integer... @@ -918,7 +923,7 @@ static int TokenLengths[] = 10, 12 }; -void FGAPIENTRY glutInitDisplayString( char* displayMode ) +void FGAPIENTRY glutInitDisplayString( const char* displayMode ) { int glut_state_flag = 0 ; /*