Commit d3fb100c authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

Fixed enumeration of joysticks in DX8.

Fixed some traces.
parent 367d1693
......@@ -704,13 +704,13 @@ HRESULT WINAPI DINPUT_DllCanUnloadNow(void)
HRESULT WINAPI DINPUT_DllGetClassObject(REFCLSID rclsid, REFIID riid,
LPVOID *ppv)
{
TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if ( IsEqualCLSID( &IID_IClassFactory, riid ) ) {
*ppv = (LPVOID)&DINPUT_CF;
IClassFactory_AddRef((IClassFactory*)*ppv);
return S_OK;
}
FIXME("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
......@@ -157,7 +157,9 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
return FALSE;
}
if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) {
if ((dwDevType == 0) ||
((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) ||
((dwDevType == DI8DEVTYPE_JOYSTICK) && (version >= 8))) {
/* check whether we have a joystick */
sprintf(dev, "%s%d", JOYDEV, id);
if ((fd = open(dev,O_RDONLY)) < 0) {
......@@ -205,7 +207,9 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
return FALSE;
}
if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) {
if ((dwDevType == 0) ||
((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) ||
((dwDevType == DI8DEVTYPE_JOYSTICK) && (version >= 8))) {
/* check whether we have a joystick */
sprintf(dev, "%s%d", JOYDEV, id);
if ((fd = open(dev,O_RDONLY)) < 0) {
......
......@@ -175,8 +175,10 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
if (id != 0)
return FALSE;
if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK))
return FALSE;
if (!((dwDevType == 0) ||
((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) ||
((dwDevType == DI8DEVTYPE_JOYSTICK) && (version >= 8))))
return FALSE;
if (dwFlags & DIEDFL_FORCEFEEDBACK)
return FALSE;
......@@ -211,8 +213,10 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
if (id != 0)
return FALSE;
if ((dwDevType != 0) && (GET_DIDEVICE_TYPE(dwDevType) != DIDEVTYPE_JOYSTICK))
return FALSE;
if (!((dwDevType == 0) ||
((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 8)) ||
((dwDevType == DI8DEVTYPE_JOYSTICK) && (version >= 8))))
return FALSE;
if (dwFlags & DIEDFL_FORCEFEEDBACK)
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment