X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_main.c;h=4c8bdd63ca44e099cf16b98a0d0367e649a35789;hb=c17923d5a5d8e319b97c2133546dfd3b52eb4cba;hp=c3bccdc39a1efe9f2e2abc5d680cc2d015cdd38d;hpb=0806929651a691f0aeb9886f8ea1b1901ec3093e;p=freeglut diff --git a/src/fg_main.c b/src/fg_main.c index c3bccdc..4c8bdd6 100644 --- a/src/fg_main.c +++ b/src/fg_main.c @@ -224,12 +224,8 @@ static void fghCheckTimers( void ) /* Platform-dependent time in milliseconds, as an unsigned 64-bit integer. * This doesn't overflow in any reasonable time, so no need to worry about * that. The GLUT API return value will however overflow after 49.7 days, - * and on Windows we (currently) do not have access to a 64-bit timestamp, - * which means internal time will still get in trouble when running the + * which means you will still get in trouble when running the * application for more than 49.7 days. - * This value wraps every 49.7 days, but integer overflows cancel - * when subtracting an initial start time, unless the total time exceeds - * 32-bit, where the GLUT API return value is also overflowed. */ fg_time_t fgSystemTime(void) { @@ -261,7 +257,7 @@ void fgError( const char *fmt, ... ) va_end( ap ); } else { - +#if FREEGLUT_ERRORS va_start( ap, fmt ); fprintf( stderr, "freeglut "); @@ -271,6 +267,7 @@ void fgError( const char *fmt, ... ) fprintf( stderr, "\n" ); va_end( ap ); +#endif if ( fgState.Initialised ) fgDeinitialize (); @@ -293,7 +290,7 @@ void fgWarning( const char *fmt, ... ) va_end( ap ); } else { - +#if FREEGLUT_WARNINGS va_start( ap, fmt ); fprintf( stderr, "freeglut "); @@ -303,6 +300,7 @@ void fgWarning( const char *fmt, ... ) fprintf( stderr, "\n" ); va_end( ap ); +#endif } } @@ -416,6 +414,9 @@ void FGAPIENTRY glutMainLoop( void ) FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMainLoop" ); + if (!fgStructure.Windows.First) + fgError(" ERROR: glutMainLoop called with no windows created."); + fgPlatformMainLoopPreliminaryWork (); fgState.ExecState = GLUT_EXEC_STATE_RUNNING ;