X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_init_mswin.c;fp=src%2Fmswin%2Ffg_init_mswin.c;h=40a4c7edcac881f5c3315bbf37b1574c5a5e22a5;hb=75ee380e8ec27aad5c793bb8d966efd927d82cba;hp=f80fe78803769031e384a286ba4d2674c88cc148;hpb=accaf1f7398fccf116cd5abf2b06a8ec2f1ace9c;p=freeglut diff --git a/src/mswin/fg_init_mswin.c b/src/mswin/fg_init_mswin.c index f80fe78..40a4c7e 100644 --- a/src/mswin/fg_init_mswin.c +++ b/src/mswin/fg_init_mswin.c @@ -33,6 +33,7 @@ extern LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); +extern void fgPlatformInitSystemTime(); /* @@ -117,6 +118,10 @@ void fgPlatformInitialize( const char* displayName ) } /* Set the timer granularity to 1 ms */ timeBeginPeriod ( 1 ); + /* Init setup to deal with timer wrap, can't query system time before this is done */ + fgPlatformInitSystemTime(); + /* Get start time */ + fgState.Time = fgSystemTime(); fgState.Initialised = GL_TRUE;