Changed several #ifdef's to proper #if's. Eeek. Oook.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@436 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-12-30 11:43:24 +00:00
parent 5d5ba0e9e9
commit ba4088e1f2

View File

@ -48,7 +48,7 @@
/* /*
* PWO: I don't like it at all. It's a mess. Could it be cleared? * PWO: I don't like it at all. It's a mess. Could it be cleared?
*/ */
#ifdef TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
# include <windows.h> # include <windows.h>
# if defined( __CYGWIN32__ ) || defined( __CYGWIN__ ) # if defined( __CYGWIN32__ ) || defined( __CYGWIN__ )
# define NEAR /* */ # define NEAR /* */
@ -103,7 +103,7 @@
# endif # endif
#endif #endif
#ifdef TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
# define _JS_MAX_AXES 6 # define _JS_MAX_AXES 6
#else #else
# ifdef __FreeBSD__ # ifdef __FreeBSD__
@ -123,7 +123,7 @@ struct tagSFG_Joystick
int id; int id;
#endif #endif
#ifdef TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
JOYINFOEX js; JOYINFOEX js;
UINT js_id; UINT js_id;
#else #else
@ -160,7 +160,7 @@ static SFG_Joystick* fgJoystick = NULL;
*/ */
static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes ) static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
{ {
#ifdef TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
MMRESULT status; MMRESULT status;
#else #else
int status; int status;
@ -180,7 +180,7 @@ static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
return; return;
} }
#ifdef TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
status = joyGetPosEx( joy->js_id, &joy->js ); status = joyGetPosEx( joy->js_id, &joy->js );
if( status != JOYERR_NOERROR ) if( status != JOYERR_NOERROR )
@ -350,7 +350,7 @@ static void fghJoystickRead( SFG_Joystick* joy, int* buttons, float* axes )
*/ */
static void fghJoystickOpen( SFG_Joystick* joy ) static void fghJoystickOpen( SFG_Joystick* joy )
{ {
#ifdef TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
JOYCAPS jsCaps; JOYCAPS jsCaps;
int i; int i;
@ -538,7 +538,7 @@ void fgJoystickInit( int ident )
fgJoystick = ( SFG_Joystick * )calloc( sizeof( SFG_Joystick ), 1 ); fgJoystick = ( SFG_Joystick * )calloc( sizeof( SFG_Joystick ), 1 );
#ifdef TARGET_HOST_WIN32 #if TARGET_HOST_WIN32
switch( ident ) switch( ident )
{ {
case 0: case 0:
@ -578,7 +578,7 @@ void fgJoystickClose( void )
if( !fgJoystick ) if( !fgJoystick )
fgError( "illegal attempt to deinitialize joystick device" ); fgError( "illegal attempt to deinitialize joystick device" );
#ifndef TARGET_HOST_WIN32 #if !TARGET_HOST_WIN32
if( ! fgJoystick->error ) if( ! fgJoystick->error )
close( fgJoystick->fd ); close( fgJoystick->fd );
#endif #endif