projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace #ifdef WIN32 with #ifdef TARGET_HOST_WIN32, as per FreeGLUT convention
[freeglut]
/
src
/
freeglut_joystick.c
diff --git
a/src/freeglut_joystick.c
b/src/freeglut_joystick.c
index
8e469bd
..
8f7b5ee
100644
(file)
--- a/
src/freeglut_joystick.c
+++ b/
src/freeglut_joystick.c
@@
-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 WIN32
+#ifdef TARGET_HOST_WIN32
# include <windows.h>
# if defined( __CYGWIN32__ ) || defined( __CYGWIN__ )
# define NEAR /* */
# include <windows.h>
# if defined( __CYGWIN32__ ) || defined( __CYGWIN__ )
# define NEAR /* */
@@
-103,7
+103,7
@@
# endif
#endif
# endif
#endif
-#ifdef WIN32
+#ifdef TARGET_HOST_WIN32
# define _JS_MAX_AXES 6
#else
# ifdef __FreeBSD__
# define _JS_MAX_AXES 6
#else
# ifdef __FreeBSD__
@@
-123,7
+123,7
@@
struct tagSFG_Joystick
int id;
#endif
int id;
#endif
-#ifdef WIN32
+#ifdef TARGET_HOST_WIN32
JOYINFOEX js;
UINT js_id;
#else
JOYINFOEX js;
UINT js_id;
#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 WIN32
+#ifdef TARGET_HOST_WIN32
MMRESULT status;
#else
int status;
MMRESULT status;
#else
int status;
@@
-180,7
+180,7
@@
static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
return;
}
return;
}
-#ifdef WIN32
+#ifdef TARGET_HOST_WIN32
status = joyGetPosEx( joy->js_id, &joy->js );
if( status != JOYERR_NOERROR )
status = joyGetPosEx( joy->js_id, &joy->js );
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 WIN32
+#ifdef TARGET_HOST_WIN32
JOYCAPS jsCaps;
int i;
JOYCAPS jsCaps;
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 WIN32
+#ifdef TARGET_HOST_WIN32
switch( ident )
{
case 0:
switch( ident )
{
case 0:
@@
-578,7
+578,7
@@
void fgJoystickClose( void )
if( !fgJoystick )
fgError( "illegal attempt to deinitialize joystick device" );
if( !fgJoystick )
fgError( "illegal attempt to deinitialize joystick device" );
-#ifndef WIN32
+#ifndef TARGET_HOST_WIN32
if( ! fgJoystick->error )
close( fgJoystick->fd );
#endif
if( ! fgJoystick->error )
close( fgJoystick->fd );
#endif