break;
case GLUT_SKIP_STALE_MOTION_EVENTS:
- fgState.SkipStaleMotion = value;
+ fgState.SkipStaleMotion = !!value;
break;
case GLUT_GEOMETRY_VISUALIZE_NORMALS:
if( fgStructure.CurrentWindow != NULL )
- fgStructure.CurrentWindow->State.VisualizeNormals = value;
+ fgStructure.CurrentWindow->State.VisualizeNormals = !!value;
break;
case GLUT_STROKE_FONT_DRAW_JOIN_DOTS:
- fgState.StrokeFontDrawJoinDots = value;
+ fgState.StrokeFontDrawJoinDots = !!value;
break;
default:
return fgPlatformGlutGet ( eWhat );
break;
}
- return -1;
}
/*
default:
return fgPlatformGlutDeviceGet ( eWhat );
}
-
- /* And now -- the failure. */
- return -1;
}
/*
/*
* Changes to requested devmode, if it doesn't match current mode
*/
-GLboolean fghPlatformChangeDisplayMode(GLboolean haveToTest, DEVMODE *devModeRequested)
+GLboolean fghChangeDisplayMode(GLboolean haveToTest, DEVMODE *devModeRequested)
{
GLboolean success = GL_FALSE;
DEVMODE devModeCurrent;
void fgPlatformRestoreState( void )
{
/* Restore the previously remembered desktop display settings */
- fghPlatformChangeDisplayMode(GL_FALSE,&fgDisplay.pDisplay.DisplayMode);
+ fghChangeDisplayMode(GL_FALSE,&fgDisplay.pDisplay.DisplayMode);
}
devMode.dmFields |= DM_DISPLAYFREQUENCY;
}
- return fghPlatformChangeDisplayMode(haveToTest, &devMode);
+ return fghChangeDisplayMode(haveToTest, &devMode);
}
void fgPlatformEnterGameMode( void )
void fgPlatformInitialize( const char* displayName )
{
WNDCLASS wc;
- ATOM atom;
+ BOOL atom;
/* What we need to do is to initialize the fgDisplay global structure here. */
fgDisplay.pDisplay.Instance = GetModuleHandle( NULL );
default:
fgWarning( "glutDeviceGet(): missing enum handle %d", eWhat );
+ return -1;
break;
}
-
- /* And now -- the failure. */
- return -1;
}
/*
ppfd->cDepthBits = 24;
ppfd->cStencilBits = 8;
- ppfd->cAuxBuffers = fghNumberOfAuxBuffersRequested();
+ ppfd->cAuxBuffers = (BYTE) fghNumberOfAuxBuffersRequested();
ppfd->iLayerType = layer_type;
ppfd->bReserved = 0;
ppfd->dwLayerMask = 0;
WNDCLASS wc;
DWORD flags = 0;
DWORD exFlags = 0;
- ATOM atom;
+ BOOL atom;
/* Grab the window class we have registered on glutInit(): */
atom = GetClassInfo( fgDisplay.pDisplay.Instance, _T("FREEGLUT"), &wc );