Author: akhaldi
Date: Mon Feb 23 20:20:45 2015
New Revision: 66435
URL:
http://svn.reactos.org/svn/reactos?rev=66435&view=rev
Log:
[DINPUT] Sync with Wine Staging 1.7.37. CORE-9246
Modified:
trunk/reactos/dll/directx/wine/dinput/dinput_main.c
trunk/reactos/dll/directx/wine/dinput/joystick.c
trunk/reactos/dll/directx/wine/dinput/joystick_linux.c
trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c
trunk/reactos/dll/directx/wine/dinput/keyboard.c
trunk/reactos/dll/directx/wine/dinput/mouse.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/directx/wine/dinput/dinput_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/di…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/dinput_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/dinput_main.c [iso-8859-1] Mon Feb 23 20:20:45
2015
@@ -60,10 +60,6 @@
return CONTAINING_RECORD( iface, IDirectInputImpl, IDirectInput8W_iface );
}
-static inline IDirectInputDeviceImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A
*iface)
-{
- return CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8A_iface);
-}
static inline IDirectInputDeviceImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W
*iface)
{
return CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface);
Modified: trunk/reactos/dll/directx/wine/dinput/joystick.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/joystick.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/joystick.c [iso-8859-1] Mon Feb 23 20:20:45
2015
@@ -398,16 +398,38 @@
return JoystickWGenericImpl_SetProperty(IDirectInputDevice8W_from_impl(This), rguid,
ph);
}
+#define DEBUG_TYPE(x) case (x): str = #x; break
void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps)
{
+ int type = GET_DIDEVICE_TYPE(lpDIDevCaps->dwDevType);
+ const char *str;
TRACE("dwSize: %d\n", lpDIDevCaps->dwSize);
TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags);
- TRACE("dwDevType: %08x %s\n", lpDIDevCaps->dwDevType,
- lpDIDevCaps->dwDevType == DIDEVTYPE_DEVICE ? "DIDEVTYPE_DEVICE" :
- lpDIDevCaps->dwDevType == DIDEVTYPE_MOUSE ? "DIDEVTYPE_MOUSE" :
- lpDIDevCaps->dwDevType == DIDEVTYPE_KEYBOARD ?
"DIDEVTYPE_KEYBOARD" :
- lpDIDevCaps->dwDevType == DIDEVTYPE_JOYSTICK ?
"DIDEVTYPE_JOYSTICK" :
- lpDIDevCaps->dwDevType == DIDEVTYPE_HID ? "DIDEVTYPE_HID" :
"UNKNOWN");
+ switch(type)
+ {
+ /* Directx <= 7 definitions */
+ DEBUG_TYPE(DIDEVTYPE_DEVICE);
+ DEBUG_TYPE(DIDEVTYPE_MOUSE);
+ DEBUG_TYPE(DIDEVTYPE_KEYBOARD);
+ DEBUG_TYPE(DIDEVTYPE_JOYSTICK);
+ DEBUG_TYPE(DIDEVTYPE_HID);
+ /* Directx >= 8 definitions */
+ DEBUG_TYPE(DI8DEVTYPE_DEVICE);
+ DEBUG_TYPE(DI8DEVTYPE_MOUSE);
+ DEBUG_TYPE(DI8DEVTYPE_KEYBOARD);
+ DEBUG_TYPE(DI8DEVTYPE_JOYSTICK);
+ DEBUG_TYPE(DI8DEVTYPE_GAMEPAD);
+ DEBUG_TYPE(DI8DEVTYPE_DRIVING);
+ DEBUG_TYPE(DI8DEVTYPE_FLIGHT);
+ DEBUG_TYPE(DI8DEVTYPE_1STPERSON);
+ DEBUG_TYPE(DI8DEVTYPE_DEVICECTRL);
+ DEBUG_TYPE(DI8DEVTYPE_SCREENPOINTER);
+ DEBUG_TYPE(DI8DEVTYPE_REMOTE);
+ DEBUG_TYPE(DI8DEVTYPE_SUPPLEMENTAL);
+ default: str = "UNKNOWN";
+ }
+
+ TRACE("dwDevType: %08x %s\n", lpDIDevCaps->dwDevType, str);
TRACE("dwAxes: %d\n", lpDIDevCaps->dwAxes);
TRACE("dwButtons: %d\n", lpDIDevCaps->dwButtons);
TRACE("dwPOVs: %d\n", lpDIDevCaps->dwPOVs);
@@ -419,6 +441,7 @@
TRACE("dwFFDriverVersion: %d\n", lpDIDevCaps->dwFFDriverVersion);
}
}
+#undef DEBUG_TYPE
HRESULT WINAPI JoystickWGenericImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface,
LPDIDEVCAPS lpDIDevCaps)
{
Modified: trunk/reactos/dll/directx/wine/dinput/joystick_linux.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/joystick_linux.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/joystick_linux.c [iso-8859-1] Mon Feb 23
20:20:45 2015
@@ -87,10 +87,7 @@
return CONTAINING_RECORD(CONTAINING_RECORD(CONTAINING_RECORD(iface,
IDirectInputDeviceImpl, IDirectInputDevice8W_iface),
JoystickGenericImpl, base), JoystickImpl, generic);
}
-static inline IDirectInputDevice8A *IDirectInputDevice8A_from_impl(JoystickImpl *This)
-{
- return &This->generic.base.IDirectInputDevice8A_iface;
-}
+
static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(JoystickImpl *This)
{
return &This->generic.base.IDirectInputDevice8W_iface;
@@ -149,6 +146,9 @@
WARN("ioctl(%s,JSIOCGAXES) failed: %s, defauting to 2\n",
joydev.device, strerror(errno));
joydev.axis_count = 2;
}
+#else
+ WARN("reading number of joystick axes unsupported in this platform,
defaulting to 2\n");
+ joydev.axis_count = 2;
#endif
#ifdef JSIOCGBUTTONS
if (ioctl(fd, JSIOCGBUTTONS, &joydev.button_count) < 0)
@@ -156,6 +156,9 @@
WARN("ioctl(%s,JSIOCGBUTTONS) failed: %s, defauting to 2\n",
joydev.device, strerror(errno));
joydev.button_count = 2;
}
+#else
+ WARN("reading number of joystick buttons unsupported in this platform,
defaulting to 2\n");
+ joydev.button_count = 2;
#endif
if (ioctl(fd, JSIOCGAXMAP, axes_map) < 0)
Modified: trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/jo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/joystick_linuxinput.c [iso-8859-1] Mon Feb 23
20:20:45 2015
@@ -124,10 +124,7 @@
return CONTAINING_RECORD(CONTAINING_RECORD(CONTAINING_RECORD(iface,
IDirectInputDeviceImpl, IDirectInputDevice8W_iface),
JoystickGenericImpl, base), JoystickImpl, generic);
}
-static inline IDirectInputDevice8A *IDirectInputDevice8A_from_impl(JoystickImpl *This)
-{
- return &This->generic.base.IDirectInputDevice8A_iface;
-}
+
static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(JoystickImpl *This)
{
return &This->generic.base.IDirectInputDevice8W_iface;
Modified: trunk/reactos/dll/directx/wine/dinput/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/ke…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/keyboard.c [iso-8859-1] Mon Feb 23 20:20:45
2015
@@ -318,6 +318,10 @@
if (len != This->base.data_format.user_df->dwDataSize )
return DIERR_INVALIDPARAM;
+
+#ifndef __REACTOS__
+ __wine_check_for_events( QS_ALLINPUT );
+#endif
EnterCriticalSection(&This->base.crit);
Modified: trunk/reactos/dll/directx/wine/dinput/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/dinput/mo…
==============================================================================
--- trunk/reactos/dll/directx/wine/dinput/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/dinput/mouse.c [iso-8859-1] Mon Feb 23 20:20:45 2015
@@ -66,10 +66,7 @@
{
return CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl,
IDirectInputDevice8W_iface), SysMouseImpl, base);
}
-static inline IDirectInputDevice8A *IDirectInputDevice8A_from_impl(SysMouseImpl *This)
-{
- return &This->base.IDirectInputDevice8A_iface;
-}
+
static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysMouseImpl *This)
{
return &This->base.IDirectInputDevice8W_iface;
@@ -536,6 +533,10 @@
if(This->base.acquired == 0) return DIERR_NOTACQUIRED;
+#ifndef __REACTOS__
+ __wine_check_for_events( QS_ALLINPUT );
+#endif
+
TRACE("(this=%p,0x%08x,%p):\n", This, len, ptr);
_dump_mouse_state(&This->m_state);
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Mon Feb 23 20:20:45 2015
@@ -36,7 +36,7 @@
reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/ddraw # Synced to Wine-1.7.27
reactos/dll/directx/wine/devenum # Synced to Wine-1.7.27
-reactos/dll/directx/wine/dinput # Synced to Wine-1.7.27
+reactos/dll/directx/wine/dinput # Synced to WineStaging-1.7.37
reactos/dll/directx/wine/dinput8 # Synced to Wine-1.7.27
reactos/dll/directx/wine/dmusic # Synced to Wine-1.7.27
reactos/dll/directx/wine/dplay # Synced to Wine-1.7.27