[DINPUT04] some fixes and cleanup from previous patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

 This patch need my 'Re: [DINPUT] Some more dinput stuf' patch (the file 
dinput-costa.diff.bis, considered as DINPUT03).

Changelog:
 - fix a stupid bug in callback handling catched by Lionel.
 - add some forgotten IID on class factory (better if we want to active the 
code)
 - make lionel happy: many cleanup on COM Macros (don't need A and W variants 
as they are the same)

Regards,
Raphael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+57aup7NA3AmQTU4RAqRkAKCIvGQRWYvq+LtlisHzBmYu83qwKQCfceK+
Uk3Sym1/61LBgBO7zrUvLAo=
=8H8K
-----END PGP SIGNATURE-----
--- include/dinput.3	2003-06-12 00:53:31.000000000 +0200
+++ include/dinput.h	2003-06-12 00:42:48.000000000 +0200
@@ -1491,19 +1491,6 @@
 ICOM_DEFINE(IDirectInputA,IUnknown)
 #undef INTERFACE
 
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define IDirectInputA_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInputA_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInputA_Release(p)            (p)->lpVtbl->Release(p)
-	/*** IDirectInputA methods ***/
-#define IDirectInputA_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInputA_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInputA_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInputA_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInputA_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-#endif
-
 /*****************************************************************************
  * IDirectInputW interface
  */
@@ -1520,15 +1507,15 @@
 
 #ifdef COBJMACROS
 /*** IUnknown methods ***/
-#define IDirectInputW_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInputW_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInputW_Release(p)            (p)->lpVtbl->Release(p)
-	/*** IDirectInputW methods ***/
-#define IDirectInputW_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInputW_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInputW_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInputW_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInputW_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
+#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput_Release(p)            (p)->lpVtbl->Release(p)
+	/*** IDirectInput methods ***/
+#define IDirectInput_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
 #endif
 
 /*****************************************************************************
@@ -1541,21 +1528,6 @@
 ICOM_DEFINE(IDirectInput2A,IDirectInputA)
 #undef INTERFACE
 
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define IDirectInput2A_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput2A_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput2A_Release(p)            (p)->lpVtbl->Release(p)
-	/*** IDirectInputA methods ***/
-#define IDirectInput2A_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput2A_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput2A_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput2A_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput2A_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-	/*** IDirectInput2A methods ***/
-#define IDirectInput2A_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
-#endif
-
 /*****************************************************************************
  * IDirectInput2W interface
  */
@@ -1568,17 +1540,17 @@
 
 #ifdef COBJMACROS
 /*** IUnknown methods ***/
-#define IDirectInput2W_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput2W_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput2W_Release(p)            (p)->lpVtbl->Release(p)
-	/*** IDirectInputW methods ***/
-#define IDirectInput2W_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput2W_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput2W_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput2W_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput2W_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-	/*** IDirectInput2W methods ***/
-#define IDirectInput2W_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
+#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput2_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput2_Release(p)            (p)->lpVtbl->Release(p)
+	/*** IDirectInput methods ***/
+#define IDirectInput2_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput2_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput2_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
+	/*** IDirectInput2 methods ***/
+#define IDirectInput2_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
 #endif
 
 #if DIRECTINPUT_VERSION >= 0x0700
@@ -1592,23 +1564,6 @@
 ICOM_DEFINE(IDirectInput7A,IDirectInput2A)
 #undef INTERFACE
 
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define IDirectInput7A_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput7A_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput7A_Release(p)            (p)->lpVtbl->Release(p)
-	/*** IDirectInputA methods ***/
-#define IDirectInput7A_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput7A_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput7A_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput7A_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput7A_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-	/*** IDirectInput2A methods ***/
-#define IDirectInput7A_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
-	/*** IDirectInput7A methods ***/
-#define IDirectInput7A_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
-#endif
-
 /*****************************************************************************
  * IDirectInput7W interface
  */
@@ -1621,19 +1576,19 @@
 
 #ifdef COBJMACROS
 /*** IUnknown methods ***/
-#define IDirectInput7W_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput7W_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput7W_Release(p)            (p)->lpVtbl->Release(p)
-	/*** IDirectInputW methods ***/
-#define IDirectInput7W_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput7W_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput7W_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput7W_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput7W_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
-	/*** IDirectInput2W methods ***/
-#define IDirectInput7W_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
-	/*** IDirectInput7W methods ***/
-#define IDirectInput7W_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
+#define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput7_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput7_Release(p)            (p)->lpVtbl->Release(p)
+	/*** IDirectInput methods ***/
+#define IDirectInput7_CreateDevice(p,a,b,c)  (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput7_GetDeviceStatus(p,a)   (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput7_Initialize(p,a,b)      (p)->lpVtbl->Initialize(p,a,b)
+	/*** IDirectInput2 methods ***/
+#define IDirectInput7_FindDevice(p,a,b,c)    (p)->lpVtbl->FindDevice(p,a,b,c)
+	/*** IDirectInput7 methods ***/
+#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d)
 #endif
 
 #endif /* DI7 */
@@ -1656,22 +1611,6 @@
 ICOM_DEFINE(IDirectInput8A,IUnknown)
 #undef INTERFACE
 
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define IDirectInput8A_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput8A_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput8A_Release(p)            (p)->lpVtbl->Release(p)
-      /*** IDirectInput8A methods ***/
-#define IDirectInput8A_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput8A_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput8A_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput8A_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput8A_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
-#define IDirectInput8A_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)
-#define IDirectInput8A_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
-#define IDirectInput8A_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
-#endif
-
 /*****************************************************************************
  * IDirectInput8W interface
  */
@@ -1691,18 +1630,18 @@
 
 #ifdef COBJMACROS
 /*** IUnknown methods ***/
-#define IDirectInput8W_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IDirectInput8W_AddRef(p)             (p)->lpVtbl->AddRef(p)
-#define IDirectInput8W_Release(p)            (p)->lpVtbl->Release(p)
-      /*** IDirectInput8W methods ***/
-#define IDirectInput8W_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)
-#define IDirectInput8W_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)
-#define IDirectInput8W_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)
-#define IDirectInput8W_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)
-#define IDirectInput8W_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
-#define IDirectInput8W_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)
-#define IDirectInput8W_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
-#define IDirectInput8W_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
+#define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDirectInput8_AddRef(p)             (p)->lpVtbl->AddRef(p)
+#define IDirectInput8_Release(p)            (p)->lpVtbl->Release(p)
+      /*** IDirectInput8 methods ***/
+#define IDirectInput8_CreateDevice(p,a,b,c)       (p)->lpVtbl->CreateDevice(p,a,b,c)
+#define IDirectInput8_EnumDevices(p,a,b,c,d)      (p)->lpVtbl->EnumDevices(p,a,b,c,d)
+#define IDirectInput8_GetDeviceStatus(p,a)        (p)->lpVtbl->GetDeviceStatus(p,a)
+#define IDirectInput8_RunControlPanel(p,a,b)      (p)->lpVtbl->RunControlPanel(p,a,b)
+#define IDirectInput8_Initialize(p,a,b)           (p)->lpVtbl->Initialize(p,a,b)
+#define IDirectInput8_FindDevice(p,a,b,c)         (p)->lpVtbl->FindDevice(p,a,b,c)
+#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e)
+#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d)
 #endif
 
 #endif /* DI8 */
Les sous-répertoires dlls/dinput.3/CVS et dlls/dinput/CVS sont identiques.
diff -u dlls/dinput.3/device.c dlls/dinput/device.c
--- dlls/dinput.3/device.c	2003-06-12 00:53:31.000000000 +0200
+++ dlls/dinput/device.c	2003-06-12 00:41:46.000000000 +0200
@@ -306,7 +306,7 @@
     ddtmp.wReserved           = lpddi->wReserved;
   }
 #endif
-  return data->lpCallBack(&ddtmp, lpvRef);
+  return data->lpCallBack(&ddtmp, data->lpvRef);
 }
 
 /******************************************************************************
Seulement dans dlls/dinput: dinput.dll.dbg.c
diff -u dlls/dinput.3/dinput_main.c dlls/dinput/dinput_main.c
--- dlls/dinput.3/dinput_main.c	2003-06-12 00:53:38.000000000 +0200
+++ dlls/dinput/dinput_main.c	2003-06-12 00:41:47.000000000 +0200
@@ -184,8 +184,7 @@
  */
 static HRESULT WINAPI IDirectInputAImpl_EnumDevices(
 	LPDIRECTINPUT7A iface, DWORD dwDevType, LPDIENUMDEVICESCALLBACKA lpCallback,
-	LPVOID pvRef, DWORD dwFlags
-)
+	LPVOID pvRef, DWORD dwFlags)
 {
 	ICOM_THIS(IDirectInputImpl,iface);
 	DIDEVICEINSTANCEA devInstance;
@@ -599,8 +598,11 @@
 
 	TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
 	if ( IsEqualGUID( &IID_IDirectInputA, riid ) ||
+	     IsEqualGUID( &IID_IDirectInputW, riid ) ||
 	     IsEqualGUID( &IID_IDirectInput2A, riid ) ||
+	     IsEqualGUID( &IID_IDirectInput2W, riid ) ||
 	     IsEqualGUID( &IID_IDirectInput7A, riid ) ||
+	     IsEqualGUID( &IID_IDirectInput7W, riid ) ||
 	     IsEqualGUID( &IID_IDirectInput8A, riid ) ||
 	     IsEqualGUID( &IID_IDirectInput8W, riid ) ) {
 		/* FIXME: reuse already created dinput if present? */
Seulement dans dlls/dinput: dinput.spec.c
Seulement dans dlls/dinput.3: dinput.spec.orig
Seulement dans dlls/dinput.3: dinput.spec.rej
Les sous-répertoires dlls/dinput.3/joystick et dlls/dinput/joystick sont identiques.
Les sous-répertoires dlls/dinput.3/keyboard et dlls/dinput/keyboard sont identiques.
Les sous-répertoires dlls/dinput.3/mouse et dlls/dinput/mouse sont identiques.

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux