directinput joy updated

This commit is contained in:
turanszkij
2015-08-19 23:29:06 +02:00
parent a341ad2c25
commit 347c1798fa
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -267,7 +267,7 @@ HRESULT DirectInput::poll(IDirectInputDevice8* joy,DIJOYSTATE2 *js)
bool DirectInput::isButtonDown(short pIndex, unsigned int buttoncode)
{
if(connectedJoys)
if(connectedJoys && buttoncode < 128)
if(joyState[pIndex].rgbButtons[buttoncode-1]!=0)
return true;
return false;
+1 -1
View File
@@ -72,7 +72,7 @@ bool wiInputManager::down(DWORD button, InputType inputType, short playerindex)
return true;
break;
case DIRECTINPUT_JOYPAD:
if (xinput != nullptr && xinput->isButtonDown(playerindex, button)){
if (dinput != nullptr && ( dinput->isButtonDown(playerindex, button) || dinput->getDirections(playerindex)==button )){
return true;
}
break;