Merge branch 'svn/trunk'

This commit is contained in:
Diederick Niehorster 2014-01-22 12:18:58 +08:00
commit 910dd744ca
2 changed files with 12 additions and 2 deletions

View File

@ -34,7 +34,8 @@ int menuID, subMenuSurround, subMenuCenter;
void createMenuEntries(int which)
{
for (int i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++)
int i;
for (i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++)
{
char temp[10] = {'\0'};
/* flag current value */
@ -51,7 +52,8 @@ void createMenuEntries(int which)
void updateMenuEntries(int which)
{
for (int i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++)
int i;
for (i = 0; i < sizeof(timerInts) / sizeof(*timerInts); i++)
{
char temp[10] = { '\0' };
/* flag current value */

View File

@ -182,6 +182,14 @@ void fgPlatformInitialize( const char* displayName )
if( !glXQueryExtension( fgDisplay.pDisplay.Display, NULL, NULL ) )
fgError( "OpenGL GLX extension not supported by display '%s'",
XDisplayName( displayName ) );
/* This forces AMD Catalyst drivers to initialize and register a shutdown
* function, which must be done before our own call to atexit to prevent
* a crash if glutMainLoop is not called or is not exited cleanly.
* (see bug #206)
*/
glXQueryExtensionsString( fgDisplay.pDisplay.Display,
DefaultScreen( fgDisplay.pDisplay.Display ));
#endif
fgDisplay.pDisplay.Screen = DefaultScreen( fgDisplay.pDisplay.Display );