Fixed enumeration of joysticks in DX8.

Fixed some traces.
This commit is contained in:
Christian Costa 2004-12-07 14:19:29 +00:00 committed by Alexandre Julliard
parent 367d16931e
commit d3fb100c36
3 changed files with 16 additions and 8 deletions

View File

@ -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;
}

View File

@ -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) {

View File

@ -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;