Allow hotplugging XInput devices in LilyPad

This commit is contained in:
Kingcom 2014-07-16 11:18:20 +02:00
parent 80b22ca2be
commit ce4dc4ae21
1 changed files with 2 additions and 5 deletions

View File

@ -212,12 +212,9 @@ void EnumXInputDevices() {
} }
pXInputEnable(1); pXInputEnable(1);
for (i=0; i<4; i++) { for (i=0; i<4; i++) {
XINPUT_STATE state;
if (ERROR_SUCCESS == pXInputGetState(i, &state)) {
wsprintfW(temp, L"XInput Pad %i", i); wsprintfW(temp, L"XInput Pad %i", i);
dm->AddDevice(new XInputDevice(i, temp)); dm->AddDevice(new XInputDevice(i, temp));
} }
}
pXInputEnable(0); pXInputEnable(0);
} }