X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=freeglut-1.3%2Ffreeglut_init.c;fp=freeglut-1.3%2Ffreeglut_init.c;h=40cc2a257e82c322483ea06d364ce7b058266e6d;hb=277d77237ecfefc4468eab0e01aea023ed808b9e;hp=a03a1143698df902d7a07b0a87fc288e6ce3ebd8;hpb=4c26f132450ad50c9b5ccf43f143ff26d53722fd;p=freeglut diff --git a/freeglut-1.3/freeglut_init.c b/freeglut-1.3/freeglut_init.c index a03a114..40cc2a2 100644 --- a/freeglut-1.3/freeglut_init.c +++ b/freeglut-1.3/freeglut_init.c @@ -55,33 +55,14 @@ SFG_Display fgDisplay; /* * The settings for the current freeglut session */ -SFG_State fgState = { { -1, -1, FALSE }, /* Position */ - { 300, 300, TRUE }, /* Size */ - GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH, /* DisplayMode */ - FALSE, /* ForceDirectContext */ - TRUE, /* TryDirectContext */ - FALSE, /* ForceIconic */ - FALSE, /* GLDebugSwitch */ - FALSE, /* XSyncSwitch */ - TRUE, /* IgnoreKeyRepeat */ - 0, /* FPSInterval */ - 0, /* SwapCount */ - 0, /* SwapTime */ +SFG_State fgState = { { -1, -1, FALSE }, { 300, 300, TRUE }, GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH, + FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, #ifdef TARGET_HOST_WIN32 - { 0, FALSE }, /* Time */ + { 0, FALSE }, #else { { 0, 0 }, FALSE }, #endif - { NULL, NULL }, /* Timers */ - NULL, /* IdleCallback */ - NULL, /* MenuStateCallback */ - NULL, /* MenuStatusCallback */ - { 640, 480, TRUE }, /* GameModeSize */ - 16, /* GameModeDepth */ - 72, /* GameModeRefresh */ - GLUT_ACTION_EXIT, /* ActionOnWindowClose */ - GLUT_EXEC_STATE_INIT /* ExecState */ -}; + { NULL, NULL }, NULL, NULL, NULL, { 640, 480, TRUE }, 16, 72, GLUT_ACTION_EXIT, GLUT_EXEC_STATE_INIT } ; /* -- PRIVATE FUNCTIONS ---------------------------------------------------- */ @@ -331,14 +312,6 @@ void fgDeinitialize( void ) fgState.MenuStateCallback = (FGCBmenuState)NULL ; fgState.MenuStatusCallback = (FGCBmenuStatus)NULL ; - /* - * FPS display - */ - fgState.SwapCount = 0; - fgState.SwapTime = 0; - fgState.FPSInterval = 0; - - #if TARGET_HOST_UNIX_X11 /* @@ -392,17 +365,6 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) #endif fgState.Time.Set = TRUE; - - /* check if GLUT_FPS env var is set */ - { - const char *fps = getenv("GLUT_FPS"); - if (fps) { - sscanf(fps, "%d", &fgState.FPSInterval); - if (fgState.FPSInterval <= 0) - fgState.FPSInterval = 5000; /* 5000 milliseconds */ - } - } - /* * Grab the environment variable indicating the X display to use. * This is harmless under Win32, so let's let it stay here...