Fix for building with SDL_JOYSTICK:off

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6012 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 8751ec3b2ae8adc29595f19c9bd244398143db07
Former-commit-id: ca27580dac1d8893ff19bd5edff0ba04392a1055
This commit is contained in:
beaglejoe 2015-05-19 21:13:38 +00:00
parent 433a869f1c
commit 61bcf43906

View file

@ -467,7 +467,9 @@ GfctrlJoyCreate(void)
tCtrlJoyInfo* joyInfo = (tCtrlJoyInfo *)calloc(1, sizeof(tCtrlJoyInfo));
#if SDL_JOYSTICK
joyInfoCopy = joyInfo;
#endif
return joyInfo;
}
@ -501,7 +503,8 @@ GfctrlJoyIsAnyPresent(void)
return gfctrlJoyPresent;
}
#if SDL_MAJOR_VERSION >= 2
#if SDL_JOYSTICK
int
GfctrlSDL2JoyGetCurrentStates(tCtrlJoyInfo *joyInfo)
{
@ -559,7 +562,8 @@ GfctrlSDL2JoyGetCurrentStates(tCtrlJoyInfo *joyInfo)
}
return 0;
}
#endif
#endif
/** Get the current state of the joysticks
@ingroup ctrl
@param joyInfo Target joystick structure
@ -571,7 +575,9 @@ int
GfctrlJoyGetCurrentStates(tCtrlJoyInfo *joyInfo)
{
#if SDL_MAJOR_VERSION >= 2
#ifdef SDL_JOYSTICK
return GfctrlSDL2JoyGetCurrentStates(joyInfo);
#endif
#endif
int ind;
#ifndef SDL_JOYSTICK