Fixing Bug Report [ 1160442 ] glutGet(GLUT_ELAPSED_TIME) is too granular
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@585 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
0bd8456a65
commit
819c712006
@ -196,6 +196,9 @@ static void fghInitialize( const char* displayName )
|
||||
ReleaseDC( desktop, context );
|
||||
}
|
||||
|
||||
/* Set the timer granularity to 1 ms */
|
||||
timeBeginPeriod ( 1 );
|
||||
|
||||
#endif
|
||||
|
||||
fgState.Initialised = GL_TRUE;
|
||||
@ -289,7 +292,6 @@ void fgDeinitialize( void )
|
||||
fgState.ProgramName = NULL;
|
||||
}
|
||||
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
/*
|
||||
@ -304,6 +306,11 @@ void fgDeinitialize( void )
|
||||
*/
|
||||
XCloseDisplay( fgDisplay.Display );
|
||||
|
||||
#elif TARGET_HOST_WIN32 || TARGET_HOST_WINCE
|
||||
|
||||
/* Reset the timer granularity */
|
||||
timeEndPeriod ( 1 );
|
||||
|
||||
#endif
|
||||
|
||||
fgState.Initialised = GL_FALSE;
|
||||
|
Reference in New Issue
Block a user