test/controllermap.c
changeset 10930 badc1f1411ef
parent 10824 e854440318d2
child 11811 5d94cb6b24d3
equal deleted inserted replaced
10929:3a44f7762496 10930:badc1f1411ef
   407     ====================================================================================\n");
   407     ====================================================================================\n");
   408 
   408 
   409     nJoystickID = SDL_JoystickInstanceID(joystick);
   409     nJoystickID = SDL_JoystickInstanceID(joystick);
   410 
   410 
   411     s_nNumAxes = SDL_JoystickNumAxes(joystick);
   411     s_nNumAxes = SDL_JoystickNumAxes(joystick);
   412     s_arrAxisState = SDL_calloc(s_nNumAxes, sizeof(*s_arrAxisState));
   412     s_arrAxisState = (AxisState *)SDL_calloc(s_nNumAxes, sizeof(*s_arrAxisState));
   413     for (iIndex = 0; iIndex < s_nNumAxes; ++iIndex) {
   413     for (iIndex = 0; iIndex < s_nNumAxes; ++iIndex) {
   414         AxisState *pAxisState = &s_arrAxisState[iIndex];
   414         AxisState *pAxisState = &s_arrAxisState[iIndex];
   415         Sint16 nInitialValue;
   415         Sint16 nInitialValue;
   416         pAxisState->m_bMoving = SDL_JoystickGetAxisInitialState(joystick, iIndex, &nInitialValue);
   416         pAxisState->m_bMoving = SDL_JoystickGetAxisInitialState(joystick, iIndex, &nInitialValue);
   417         pAxisState->m_nStartingValue = nInitialValue;
   417         pAxisState->m_nStartingValue = nInitialValue;