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();
#endif
#else
#elif defined(__linux__)
int fd;
char device_file_name[64];
struct ff_effect effect;
@ -297,7 +297,7 @@ void PAD_Shutdown()
#ifdef USE_RUMBLE_DINPUT_HACK
FreeDirectInput();
#endif
#else
#elif defined(__linux__)
close(fd);
#endif
}
@ -436,7 +436,7 @@ void PAD_GetStatus(BYTE _numPAD, SPADStatus* _pPADStatus)
g_pEffect->Start(1, 0);
}
#endif
#else
#elif defined(__linux__)
if(!fd)
{
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();
}
#endif
#else
#elif defined(__linux__)
struct input_event event;
if(CanRumble)
{

View File

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