Added support for X360pad rumble

Need someone who has a X360pad to test.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4929 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2010-01-23 12:36:30 +00:00
parent 2098271bc8
commit 1ecbcb39ea
5 changed files with 163 additions and 90 deletions

View File

@ -97,17 +97,17 @@ int GetXI(int Controller, int Button)
{
// Update the internal status
DWORD dwResult;
dwResult = XInputGetState( Controller, &g_Controllers[Controller].state );
dwResult = XInputGetState(Controller, &g_Controllers[Controller].state);
if( dwResult != ERROR_SUCCESS ) return -1;
if (dwResult != ERROR_SUCCESS) return -1;
switch(Button)
switch (Button)
{
case InputCommon::XI_TRIGGER_L:
return g_Controllers[0].state.Gamepad.bLeftTrigger;
return g_Controllers[Controller].state.Gamepad.bLeftTrigger;
case InputCommon::XI_TRIGGER_R:
return g_Controllers[0].state.Gamepad.bRightTrigger;
return g_Controllers[Controller].state.Gamepad.bRightTrigger;
default:
return 0;