fix: checking for touchpad on all controllers
This commit is contained in:
@@ -23,6 +23,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "INP_ForceFeedback.h"
|
||||
#include "INP_Main.h"
|
||||
|
||||
void CForceFeedback::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC)
|
||||
{
|
||||
@@ -109,7 +110,7 @@ void CForceFeedback::Tick(void)
|
||||
while (pRumbleNode)
|
||||
{
|
||||
RUMBLE_EFFECT *pRumble = pRumbleNode->GetDataAs<RUMBLE_EFFECT>();
|
||||
SDL_Gamepad* m_pGamepad = SDL_GetGamepadFromPlayerIndex(pRumble->m_Pad);
|
||||
SDL_Gamepad* m_pGamepad = InternalInputManager.m_Joypads[pRumble->m_Pad].m_pGamepad;
|
||||
|
||||
if (pRumble->m_TimeLeft <= qwCurrentTime.QuadPart)
|
||||
{
|
||||
|
||||
@@ -148,9 +148,13 @@ void CInput::SetJoypadValues(JOYPAD *pThisPad)
|
||||
pThisPad->m_uiButtons |= _360_JOY_BUTTON_BACK;
|
||||
}
|
||||
|
||||
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_TOUCHPAD))
|
||||
//str1k3r - Only check the touchpad if we have one
|
||||
if (SDL_GetNumGamepadTouchpads(pGamePad) > 0)
|
||||
{
|
||||
pThisPad->m_uiButtons |= _PS_JOY_BUTTON_TOUCHPAD;
|
||||
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_TOUCHPAD))
|
||||
{
|
||||
pThisPad->m_uiButtons |= _PS_JOY_BUTTON_TOUCHPAD;
|
||||
}
|
||||
}
|
||||
|
||||
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_LEFT_STICK))
|
||||
|
||||
Reference in New Issue
Block a user