/* Register the window class */
atom = RegisterClass( &wc );
- assert( atom );
+ FREEGLUT_INTERNAL_ERROR_EXIT ( atom, "Window Class Not Registered", "fghInitialize" );
}
/* The screen dimensions can be obtained via GetSystemMetrics() calls */
return;
}
- /* fgState.Initialised = GL_FALSE; */
-
/* If there was a menu created, destroy the rendering context */
if( fgStructure.MenuContext )
{
fgDestroyStructure( );
- while( ( timer = fgState.Timers.First ) )
+ while( timer = fgState.Timers.First )
{
fgListRemove( &fgState.Timers, &timer->Node );
free( timer );
}
- while( ( timer = fgState.FreeTimers.First) )
+ while( timer = fgState.FreeTimers.First )
{
fgListRemove( &fgState.FreeTimers, &timer->Node );
free( timer );
XCloseDisplay( fgDisplay.Display );
#endif
+
+ fgState.Initialised = GL_FALSE;
}
/*
* size.
*/
- if( geometry )
+ if (geometry )
{
- unsigned int parsedWidth, parsedHeight;
int mask = XParseGeometry( geometry,
&fgState.Position.X, &fgState.Position.Y,
- &parsedWidth, &parsedHeight );
- /* TODO: Check for overflow? */
- fgState.Size.X = parsedWidth;
- fgState.Size.Y = parsedHeight;
+ &fgState.Size.X, &fgState.Size.Y );
if( (mask & (WidthValue|HeightValue)) == (WidthValue|HeightValue) )
fgState.Size.Use = GL_TRUE;