X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffg_init_mswin.c;h=9822f8c6a401d170a9b7c1743346672463d13f8a;hb=6090a1ed96f3eb4c90f1f38ec9cd37ae0fe9b30e;hp=f80fe78803769031e384a286ba4d2674c88cc148;hpb=5b3d339481bac6dbaeb599bffc1325f716585bfe;p=freeglut diff --git a/src/mswin/fg_init_mswin.c b/src/mswin/fg_init_mswin.c index f80fe78..9822f8c 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(); /* @@ -56,9 +57,6 @@ void fgPlatformInitialize( const char* displayName ) * Each of the windows should have its own device context, and we * want redraw events during Vertical and Horizontal Resizes by * the user. - * - * XXX Old code had "| CS_DBCLCKS" commented out. Plans for the - * XXX future? Dead-end idea? */ wc.lpfnWndProc = fgPlatformWindowProc; wc.cbClsExtra = 0; @@ -117,6 +115,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;