Fixed compilation on Mac OS X by testing for Linux explicitly instead of assuming that non-Windows equals Linux.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne 2008-08-30 08:49:34 +00:00
parent 3e029639df
commit 838f37112e
2 changed files with 7 additions and 5 deletions

View File

@ -70,7 +70,7 @@ BOOL CALLBACK EnumAxesCallback(const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pCont
HRESULT SetDeviceForcesXY(); HRESULT SetDeviceForcesXY();
#endif #endif
#else #elif defined(__linux__)
int fd; int fd;
char device_file_name[64]; char device_file_name[64];
struct ff_effect effect; struct ff_effect effect;
@ -297,7 +297,7 @@ void PAD_Shutdown()
#ifdef USE_RUMBLE_DINPUT_HACK #ifdef USE_RUMBLE_DINPUT_HACK
FreeDirectInput(); FreeDirectInput();
#endif #endif
#else #elif defined(__linux__)
close(fd); close(fd);
#endif #endif
} }
@ -436,7 +436,7 @@ void PAD_GetStatus(BYTE _numPAD, SPADStatus* _pPADStatus)
g_pEffect->Start(1, 0); g_pEffect->Start(1, 0);
} }
#endif #endif
#else #elif defined(__linux__)
if(!fd) if(!fd)
{ {
sprintf(device_file_name, "/dev/input/event%d", joysticks[_numPAD].eventnum); //TODO: Make dynamic // sprintf(device_file_name, "/dev/input/event%d", joysticks[_numPAD].eventnum); //TODO: Make dynamic //
@ -506,7 +506,7 @@ void PAD_Rumble(BYTE _numPAD, unsigned int _uType, unsigned int _uStrength)
SetDeviceForcesXY(); SetDeviceForcesXY();
} }
#endif #endif
#else #elif defined(__linux__)
struct input_event event; struct input_event event;
if(CanRumble) if(CanRumble)
{ {

View File

@ -58,8 +58,10 @@
#else #else
#include <unistd.h> #include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <linux/input.h>
#define SLEEP(x) usleep(x*1000) #define SLEEP(x) usleep(x*1000)
#endif
#ifdef __linux__
#include <linux/input.h>
#endif #endif
#ifdef USE_WXWIDGETS #ifdef USE_WXWIDGETS