mirror of https://github.com/PCSX2/pcsx2.git
parent
d62d2abf59
commit
ac0e40a2b7
|
@ -23,12 +23,27 @@ void GamePad::EnumerateGamePads(vector<GamePad*>& vgamePad)
|
|||
JoystickInfo::EnumerateJoysticks(vgamePad);
|
||||
#endif
|
||||
}
|
||||
|
||||
void GamePad::UpdateReleaseState()
|
||||
{
|
||||
#ifdef SDL_BUILD
|
||||
JoystickInfo::UpdateReleaseState();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Safely dispatch to the Rumble method above
|
||||
**/
|
||||
void GamePad::DoRumble(int type, int pad)
|
||||
{
|
||||
u32 id = conf->get_joyid(pad);
|
||||
if (GamePadIdWithinBounds(id)) {
|
||||
GamePad* gamePad = s_vgamePad[id];
|
||||
if (gamePad)
|
||||
gamePad->Rumble(type, pad);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update state of every attached devices
|
||||
**/
|
||||
|
|
|
@ -43,6 +43,10 @@ class GamePad
|
|||
* Rumble will differ according to type which is either 0(small motor) or 1(big motor)
|
||||
**/
|
||||
virtual void Rumble(int type,int pad){return;}
|
||||
/**
|
||||
* Safely dispatch to the Rumble method above
|
||||
**/
|
||||
static void DoRumble(int type, int pad);
|
||||
|
||||
virtual bool Init(int id){return false;} // opens a handle and gets information
|
||||
|
||||
|
|
|
@ -418,9 +418,7 @@ u8 _PADpoll(u8 value)
|
|||
if (padVibF[curPad][2] != vib_small)
|
||||
{
|
||||
padVibF[curPad][2] = vib_small;
|
||||
// SetDeviceForceS (padVibC[curPad], vib_small);
|
||||
GamePad* gamePad = s_vgamePad[conf->get_joyid(curPad)];
|
||||
gamePad->Rumble(0,curPad);
|
||||
GamePad::DoRumble(0, curPad);
|
||||
}
|
||||
|
||||
/* Big Motor */
|
||||
|
@ -429,9 +427,7 @@ u8 _PADpoll(u8 value)
|
|||
if (padVibF[curPad][3] != vib_big)
|
||||
{
|
||||
padVibF[curPad][3] = vib_big;
|
||||
// SetDeviceForceB (padVibC[curPad], vib_big);
|
||||
GamePad* gamePad = s_vgamePad[conf->get_joyid(curPad)];
|
||||
gamePad->Rumble(1,curPad);
|
||||
GamePad::DoRumble(1, curPad);
|
||||
}
|
||||
|
||||
return padID[curPad];
|
||||
|
|
Loading…
Reference in New Issue