A couple of structures declarations in dinput.h were odd regarding the {A,W} and const. Changelog: - Made sure const LP were actually const in dinput.h. - Uniformized the {A,W} declarations of some structures. Vincent
diff -urN wine-orig/dlls/dinput/dinput_private.h wine-pas-compilé/dlls/dinput/dinput_private.h --- wine-orig/dlls/dinput/dinput_private.h Tue May 21 09:59:39 2002 +++ wine-pas-compilé/dlls/dinput/dinput_private.h Sat Jun 1 14:24:14 2002 @@ -36,7 +36,7 @@ /* Function called by all devices that Wine supports */ typedef struct dinput_device { INT pref; - BOOL (*enum_device)(DWORD dwDevType, DWORD dwFlags, LPCDIDEVICEINSTANCEA lpddi); + BOOL (*enum_device)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi); HRESULT (*create_device)(IDirectInputAImpl *dinput, REFGUID rguid, REFIID riid, LPDIRECTINPUTDEVICEA* pdev); } dinput_device; diff -urN wine-orig/dlls/dinput/joystick/linux.c wine-pas-compilé/dlls/dinput/joystick/linux.c --- wine-orig/dlls/dinput/joystick/linux.c Fri May 31 19:32:14 2002 +++ wine-pas-compilé/dlls/dinput/joystick/linux.c Sat Jun 1 14:24:37 2002 @@ -85,7 +85,7 @@ {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7} }; -static BOOL joydev_enum_device(DWORD dwDevType, DWORD dwFlags, LPCDIDEVICEINSTANCEA lpddi) +static BOOL joydev_enum_device(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi) { if ((dwDevType==0) || (GET_DIDEVICE_TYPE(dwDevType)==DIDEVTYPE_JOYSTICK)) { /* check whether we have a joystick */ diff -urN wine-orig/dlls/dinput/joystick/linuxinput.c wine-pas-compilé/dlls/dinput/joystick/linuxinput.c --- wine-orig/dlls/dinput/joystick/linuxinput.c Fri May 31 19:32:14 2002 +++ wine-pas-compilé/dlls/dinput/joystick/linuxinput.c Sat Jun 1 14:24:59 2002 @@ -118,7 +118,7 @@ #define test_bit(arr,bit) (((BYTE*)arr)[bit>>3]&(1<<(bit&7))) -static BOOL joydev_enum_device(DWORD dwDevType, DWORD dwFlags, LPCDIDEVICEINSTANCEA lpddi) +static BOOL joydev_enum_device(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi) { int i, fd, havejoy = 0; diff -urN wine-orig/dlls/dinput/keyboard/main.c wine-pas-compilé/dlls/dinput/keyboard/main.c --- wine-orig/dlls/dinput/keyboard/main.c Fri May 31 19:32:14 2002 +++ wine-pas-compilé/dlls/dinput/keyboard/main.c Sat Jun 1 14:25:23 2002 @@ -134,7 +134,7 @@ {0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41} }; -static BOOL keyboarddev_enum_device(DWORD dwDevType, DWORD dwFlags, LPCDIDEVICEINSTANCEA lpddi) +static BOOL keyboarddev_enum_device(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi) { if ((dwDevType == 0) || (dwDevType == DIDEVTYPE_KEYBOARD)) { TRACE("Enumerating the Keyboard device\n"); diff -urN wine-orig/dlls/dinput/mouse/main.c wine-pas-compilé/dlls/dinput/mouse/main.c --- wine-orig/dlls/dinput/mouse/main.c Fri May 31 19:32:14 2002 +++ wine-pas-compilé/dlls/dinput/mouse/main.c Sat Jun 1 14:25:34 2002 @@ -144,7 +144,7 @@ static IDirectInputDevice2A* current_lock = NULL; -static BOOL mousedev_enum_device(DWORD dwDevType, DWORD dwFlags, LPCDIDEVICEINSTANCEA lpddi) +static BOOL mousedev_enum_device(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi) { if ((dwDevType == 0) || (dwDevType == DIDEVTYPE_MOUSE)) { TRACE("Enumerating the mouse device\n"); diff -urN wine-orig/include/dinput.h wine-pas-compilé/include/dinput.h --- wine-orig/include/dinput.h Fri May 31 19:28:57 2002 +++ wine-pas-compilé/include/dinput.h Sat Jun 1 14:18:36 2002 @@ -214,7 +214,8 @@ WORD wExponent; WORD wReserved; #endif /* DIRECTINPUT_VERSION >= 0x0500 */ -} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA,*LPCDIDEVICEOBJECTINSTANCEA; +} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA; +typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA; typedef struct { DWORD dwSize; @@ -234,9 +235,12 @@ WORD wExponent; WORD wReserved; #endif /* DIRECTINPUT_VERSION >= 0x0500 */ -} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW,*LPCDIDEVICEOBJECTINSTANCEW; -DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE) +} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW; +typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW; + DECL_WINELIB_TYPE_AW(DIDEVICEOBJECTINSTANCE) +DECL_WINELIB_TYPE_AW(LPDIDEVICEOBJECTINSTANCE) +DECL_WINELIB_TYPE_AW(LPCDIDEVICEOBJECTINSTANCE) typedef struct { @@ -251,7 +255,8 @@ WORD wUsagePage; WORD wUsage; #endif /* DIRECTINPUT_VERSION >= 0x0500 */ -} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA, *LPCDIDEVICEINSTANCEA; +} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA; +typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA; typedef struct { DWORD dwSize; @@ -265,7 +270,9 @@ WORD wUsagePage; WORD wUsage; #endif /* DIRECTINPUT_VERSION >= 0x0500 */ -} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW, *LPCDIDEVICEINSTANCEW; +} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW; +typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW; + DECL_WINELIB_TYPE_AW(DIDEVICEINSTANCE) DECL_WINELIB_TYPE_AW(LPDIDEVICEINSTANCE) DECL_WINELIB_TYPE_AW(LPCDIDEVICEINSTANCE) @@ -449,7 +456,8 @@ DWORD dwData; DWORD dwTimeStamp; DWORD dwSequence; -} DIDEVICEOBJECTDATA,*LPDIDEVICEOBJECTDATA,*LPCDIDEVICEOBJECTDATA; +} DIDEVICEOBJECTDATA,*LPDIDEVICEOBJECTDATA; +typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA; typedef struct _DIOBJECTDATAFORMAT { const GUID *pguid; @@ -511,7 +519,8 @@ DIPROPHEADER diph; GUID guidClass; WCHAR wszPath[MAX_PATH]; -} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH,*LPCDIPROPGUIDANDPATH; +} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH; +typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH; /* special property GUIDs */ #ifdef __cplusplus @@ -657,6 +666,7 @@ DWORD dwDynamicParams; CHAR tszName[MAX_PATH]; } DIEFFECTINFOA, *LPDIEFFECTINFOA; +typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA; typedef struct DIEFFECTINFOW { DWORD dwSize; @@ -666,18 +676,11 @@ DWORD dwDynamicParams; WCHAR tszName[MAX_PATH]; } DIEFFECTINFOW, *LPDIEFFECTINFOW; - -#ifdef UNICODE -typedef DIEFFECTINFOW DIEFFECTINFO; -typedef LPDIEFFECTINFOW LPDIEFFECTINFO; -#else -typedef DIEFFECTINFOA DIEFFECTINFO; -typedef LPDIEFFECTINFOA LPDIEFFECTINFO; -#endif - -typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA; typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW; -typedef const DIEFFECTINFO *LPCDIEFFECTINFO; + +DECL_WINELIB_TYPE_AW(DIEFFECTINFO) +DECL_WINELIB_TYPE_AW(LPDIEFFECTINFO) +DECL_WINELIB_TYPE_AW(LPCDIEFFECTINFO) typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID); typedef BOOL (CALLBACK *LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID);