Fix for 917 joystick calibration not working SDL2

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

Former-commit-id: 6692a8044fae93700c157012e8c3660fdcd31cea
Former-commit-id: 0f8e86c1f0bfd5cfb387faea5caace9f98fad80e
This commit is contained in:
beaglejoe 2015-04-16 03:06:36 +00:00
parent 32650b8f60
commit c4abb4a6c9
2 changed files with 3 additions and 1 deletions

View file

@ -585,6 +585,7 @@ GfctrlJoyGetCurrentStates(tCtrlJoyInfo *joyInfo)
if (joyInfo->oldb[GFCTRL_JOY_MAX_BUTTONS * ind + i] == joyInfo->levelup[GFCTRL_JOY_MAX_BUTTONS * ind + i]) {
// already informed system of event up/down already, so clear it
joyInfo->edgeup[i + GFCTRL_JOY_MAX_BUTTONS * ind] = 0;
joyInfo->edgedn[i + GFCTRL_JOY_MAX_BUTTONS * ind] = 0;
}
// store button for next round

View file

@ -638,10 +638,11 @@ GfuiScreenActivate(void *screen)
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
else
SDL_EnableKeyRepeat(0, 0);
#endif
#else
#if SDL_JOYSTICK
GfuiApp().eventLoop().setJoystickAxisCB(GfctrlJoySetAxis);
GfuiApp().eventLoop().setJoystickButtonCB(GfctrlJoySetButton);
#endif
#endif
if (GfuiScreen->onlyCallback == 0)