projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed <sys/time.h> / <time.h> handling as suggested by the autoconf
[freeglut]
/
src
/
freeglut_init.c
diff --git
a/src/freeglut_init.c
b/src/freeglut_init.c
index
01f2af2
..
d5a5aa6
100644
(file)
--- a/
src/freeglut_init.c
+++ b/
src/freeglut_init.c
@@
-25,10
+25,6
@@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <GL/freeglut.h>
#include "freeglut_internal.h"
#include <GL/freeglut.h>
#include "freeglut_internal.h"
@@
-228,13
+224,13
@@
void fgDeinitialize( void )
fgDestroyStructure( );
fgDestroyStructure( );
- while( timer = fgState.Timers.First )
+ while( ( timer = fgState.Timers.First) )
{
fgListRemove( &fgState.Timers, &timer->Node );
free( timer );
}
{
fgListRemove( &fgState.Timers, &timer->Node );
free( timer );
}
- while( timer = fgState.FreeTimers.First )
+ while( ( timer = fgState.FreeTimers.First) )
{
fgListRemove( &fgState.FreeTimers, &timer->Node );
free( timer );
{
fgListRemove( &fgState.FreeTimers, &timer->Node );
free( timer );
@@
-620,9
+616,13
@@
void FGAPIENTRY glutInit( int* pargc, char** argv )
if (geometry )
{
if (geometry )
{
+ unsigned int parsedWidth, parsedHeight;
int mask = XParseGeometry( geometry,
&fgState.Position.X, &fgState.Position.Y,
int mask = XParseGeometry( geometry,
&fgState.Position.X, &fgState.Position.Y,
- &fgState.Size.X, &fgState.Size.Y );
+ &parsedWidth, &parsedHeight );
+ /* TODO: Check for overflow? */
+ fgState.Size.X = parsedWidth;
+ fgState.Size.Y = parsedHeight;
if( (mask & (WidthValue|HeightValue)) == (WidthValue|HeightValue) )
fgState.Size.Use = GL_TRUE;
if( (mask & (WidthValue|HeightValue)) == (WidthValue|HeightValue) )
fgState.Size.Use = GL_TRUE;