X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_state.c;h=9ddfdd9186de9116f38fc4d963dfe079050f9081;hb=75ee380e8ec27aad5c793bb8d966efd927d82cba;hp=5f8c08afc6e304b0fd644c09d0f0638de16191f9;hpb=accaf1f7398fccf116cd5abf2b06a8ec2f1ace9c;p=freeglut diff --git a/src/fg_state.c b/src/fg_state.c index 5f8c08a..9ddfdd9 100644 --- a/src/fg_state.c +++ b/src/fg_state.c @@ -136,6 +136,12 @@ int FGAPIENTRY glutGet( GLenum eWhat ) case GLUT_INIT_STATE: return fgState.Initialised; + /* Although internally the time store is 64bits wide, the return value + * here still wraps every 49.7 days. Integer overflows cancel however + * when subtracting an initial start time, unless the total time exceeds + * 32-bit, so you can still work with this. + * XXX: a glutGet64 to return the time might be an idea... + */ case GLUT_ELAPSED_TIME: return (int) fgElapsedTime(); }