Added another missing case when enumerating joysticks, DI8DEVTYPE_SUPPLEMENTAL,

that should fix a lot more pads that were being reported as not being detected.
Also added some debug log messages that output each device's type and name
so in the future if other devices fail to be detected we can easily see what it
is in the info log.
This commit is contained in:
Shenjoku
2013-06-12 10:30:37 -07:00
parent ec23a019e2
commit c56c40fad1
@@ -25,10 +25,13 @@ static BOOL CALLBACK EnumDevicesCallback( const DIDEVICEINSTANCE *pdidInstance,
{
DIDevice device;
LOG->Info( "DInput: Enumerating device - Type: 0x%08X Instance Name: \"%s\" Product Name: \"%s\"", pdidInstance->dwDevType, pdidInstance->tszInstanceName, pdidInstance->tszProductName );
switch( GET_DIDEVICE_TYPE(pdidInstance->dwDevType) )
{
case DI8DEVTYPE_JOYSTICK:
case DI8DEVTYPE_GAMEPAD:
case DI8DEVTYPE_SUPPLEMENTAL:
{
device.type = device.JOYSTICK;
break;
@@ -36,7 +39,7 @@ static BOOL CALLBACK EnumDevicesCallback( const DIDEVICEINSTANCE *pdidInstance,
case DI8DEVTYPE_KEYBOARD: device.type = device.KEYBOARD; break;
case DI8DEVTYPE_MOUSE: device.type = device.MOUSE; break;
default: return DIENUM_CONTINUE;
default: LOG->Info( "DInput: Unrecognized device ignored." ); return DIENUM_CONTINUE;
}
device.JoystickInst = *pdidInstance;