directinput joy updated
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user