Dolphin, the GameCube and Wii emulator - Forums
Phantom button presses on Logitech Cordless Rumlepad 2 - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support)
+--- Forum: Controllers (https://forums.dolphin-emu.org/Forum-controllers)
+--- Thread: Phantom button presses on Logitech Cordless Rumlepad 2 (/Thread-phantom-button-presses-on-logitech-cordless-rumlepad-2)



Phantom button presses on Logitech Cordless Rumlepad 2 - Seol - 12-09-2015

Hi all,

When playing games in Dolphin (4.0-8199 x64, Windows) using my venerable Logitech Cordless Rumlepad 2, occasionally the emu registers button presses that I didn't press (it only happens with Dolphin, it's not a hardware problem with the gamepad). Having a look at the source (DInputJoystick.cpp), it looks like the button press test code:

Code:
ControlState Joystick::Button::GetState() const
{
return ControlState(m_button > 0);
}

should be:

Code:
ControlState Joystick::Button::GetState() const
{
return ControlState((m_button & 0x80) > 0);
}

as per the DirectInput reference (the other bits are undefined, but usually 0, I think). Unfortunately I don't have VS2015 installed to test it right now, might get enough time to set it up in a week or so.

Cheers!