mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
[DINPUT] Sync with Wine Staging 1.7.37. CORE-9246
svn path=/trunk/; revision=66435
This commit is contained in:
parent
23bc579d1a
commit
075ebb4c7b
|
@ -60,10 +60,6 @@ static inline IDirectInputImpl *impl_from_IDirectInput8W( IDirectInput8W *iface
|
||||||
return CONTAINING_RECORD( iface, IDirectInputImpl, IDirectInput8W_iface );
|
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)
|
static inline IDirectInputDeviceImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface);
|
return CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface);
|
||||||
|
|
|
@ -398,16 +398,38 @@ HRESULT WINAPI JoystickAGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface, REF
|
||||||
return JoystickWGenericImpl_SetProperty(IDirectInputDevice8W_from_impl(This), rguid, ph);
|
return JoystickWGenericImpl_SetProperty(IDirectInputDevice8W_from_impl(This), rguid, ph);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define DEBUG_TYPE(x) case (x): str = #x; break
|
||||||
void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps)
|
void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps)
|
||||||
{
|
{
|
||||||
|
int type = GET_DIDEVICE_TYPE(lpDIDevCaps->dwDevType);
|
||||||
|
const char *str;
|
||||||
TRACE("dwSize: %d\n", lpDIDevCaps->dwSize);
|
TRACE("dwSize: %d\n", lpDIDevCaps->dwSize);
|
||||||
TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags);
|
TRACE("dwFlags: %08x\n", lpDIDevCaps->dwFlags);
|
||||||
TRACE("dwDevType: %08x %s\n", lpDIDevCaps->dwDevType,
|
switch(type)
|
||||||
lpDIDevCaps->dwDevType == DIDEVTYPE_DEVICE ? "DIDEVTYPE_DEVICE" :
|
{
|
||||||
lpDIDevCaps->dwDevType == DIDEVTYPE_MOUSE ? "DIDEVTYPE_MOUSE" :
|
/* Directx <= 7 definitions */
|
||||||
lpDIDevCaps->dwDevType == DIDEVTYPE_KEYBOARD ? "DIDEVTYPE_KEYBOARD" :
|
DEBUG_TYPE(DIDEVTYPE_DEVICE);
|
||||||
lpDIDevCaps->dwDevType == DIDEVTYPE_JOYSTICK ? "DIDEVTYPE_JOYSTICK" :
|
DEBUG_TYPE(DIDEVTYPE_MOUSE);
|
||||||
lpDIDevCaps->dwDevType == DIDEVTYPE_HID ? "DIDEVTYPE_HID" : "UNKNOWN");
|
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("dwAxes: %d\n", lpDIDevCaps->dwAxes);
|
||||||
TRACE("dwButtons: %d\n", lpDIDevCaps->dwButtons);
|
TRACE("dwButtons: %d\n", lpDIDevCaps->dwButtons);
|
||||||
TRACE("dwPOVs: %d\n", lpDIDevCaps->dwPOVs);
|
TRACE("dwPOVs: %d\n", lpDIDevCaps->dwPOVs);
|
||||||
|
@ -419,6 +441,7 @@ void _dump_DIDEVCAPS(const DIDEVCAPS *lpDIDevCaps)
|
||||||
TRACE("dwFFDriverVersion: %d\n", lpDIDevCaps->dwFFDriverVersion);
|
TRACE("dwFFDriverVersion: %d\n", lpDIDevCaps->dwFFDriverVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#undef DEBUG_TYPE
|
||||||
|
|
||||||
HRESULT WINAPI JoystickWGenericImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface, LPDIDEVCAPS lpDIDevCaps)
|
HRESULT WINAPI JoystickWGenericImpl_GetCapabilities(LPDIRECTINPUTDEVICE8W iface, LPDIDEVCAPS lpDIDevCaps)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,10 +87,7 @@ static inline JoystickImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W
|
||||||
return CONTAINING_RECORD(CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface),
|
return CONTAINING_RECORD(CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface),
|
||||||
JoystickGenericImpl, base), JoystickImpl, generic);
|
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)
|
static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(JoystickImpl *This)
|
||||||
{
|
{
|
||||||
return &This->generic.base.IDirectInputDevice8W_iface;
|
return &This->generic.base.IDirectInputDevice8W_iface;
|
||||||
|
@ -149,6 +146,9 @@ static INT find_joystick_devices(void)
|
||||||
WARN("ioctl(%s,JSIOCGAXES) failed: %s, defauting to 2\n", joydev.device, strerror(errno));
|
WARN("ioctl(%s,JSIOCGAXES) failed: %s, defauting to 2\n", joydev.device, strerror(errno));
|
||||||
joydev.axis_count = 2;
|
joydev.axis_count = 2;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
WARN("reading number of joystick axes unsupported in this platform, defaulting to 2\n");
|
||||||
|
joydev.axis_count = 2;
|
||||||
#endif
|
#endif
|
||||||
#ifdef JSIOCGBUTTONS
|
#ifdef JSIOCGBUTTONS
|
||||||
if (ioctl(fd, JSIOCGBUTTONS, &joydev.button_count) < 0)
|
if (ioctl(fd, JSIOCGBUTTONS, &joydev.button_count) < 0)
|
||||||
|
@ -156,6 +156,9 @@ static INT find_joystick_devices(void)
|
||||||
WARN("ioctl(%s,JSIOCGBUTTONS) failed: %s, defauting to 2\n", joydev.device, strerror(errno));
|
WARN("ioctl(%s,JSIOCGBUTTONS) failed: %s, defauting to 2\n", joydev.device, strerror(errno));
|
||||||
joydev.button_count = 2;
|
joydev.button_count = 2;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
WARN("reading number of joystick buttons unsupported in this platform, defaulting to 2\n");
|
||||||
|
joydev.button_count = 2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ioctl(fd, JSIOCGAXMAP, axes_map) < 0)
|
if (ioctl(fd, JSIOCGAXMAP, axes_map) < 0)
|
||||||
|
|
|
@ -124,10 +124,7 @@ static inline JoystickImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W
|
||||||
return CONTAINING_RECORD(CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface),
|
return CONTAINING_RECORD(CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface),
|
||||||
JoystickGenericImpl, base), JoystickImpl, generic);
|
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)
|
static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(JoystickImpl *This)
|
||||||
{
|
{
|
||||||
return &This->generic.base.IDirectInputDevice8W_iface;
|
return &This->generic.base.IDirectInputDevice8W_iface;
|
||||||
|
|
|
@ -319,6 +319,10 @@ static HRESULT WINAPI SysKeyboardWImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W ifac
|
||||||
if (len != This->base.data_format.user_df->dwDataSize )
|
if (len != This->base.data_format.user_df->dwDataSize )
|
||||||
return DIERR_INVALIDPARAM;
|
return DIERR_INVALIDPARAM;
|
||||||
|
|
||||||
|
#ifndef __REACTOS__
|
||||||
|
__wine_check_for_events( QS_ALLINPUT );
|
||||||
|
#endif
|
||||||
|
|
||||||
EnterCriticalSection(&This->base.crit);
|
EnterCriticalSection(&This->base.crit);
|
||||||
|
|
||||||
if (TRACE_ON(dinput)) {
|
if (TRACE_ON(dinput)) {
|
||||||
|
|
|
@ -66,10 +66,7 @@ static inline SysMouseImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(CONTAINING_RECORD(iface, IDirectInputDeviceImpl, IDirectInputDevice8W_iface), SysMouseImpl, base);
|
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)
|
static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysMouseImpl *This)
|
||||||
{
|
{
|
||||||
return &This->base.IDirectInputDevice8W_iface;
|
return &This->base.IDirectInputDevice8W_iface;
|
||||||
|
@ -536,6 +533,10 @@ static HRESULT WINAPI SysMouseWImpl_GetDeviceState(LPDIRECTINPUTDEVICE8W iface,
|
||||||
|
|
||||||
if(This->base.acquired == 0) return DIERR_NOTACQUIRED;
|
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);
|
TRACE("(this=%p,0x%08x,%p):\n", This, len, ptr);
|
||||||
_dump_mouse_state(&This->m_state);
|
_dump_mouse_state(&This->m_state);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-1.7.27
|
||||||
reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.37
|
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/ddraw # Synced to Wine-1.7.27
|
||||||
reactos/dll/directx/wine/devenum # 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/dinput8 # Synced to Wine-1.7.27
|
||||||
reactos/dll/directx/wine/dmusic # 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
|
reactos/dll/directx/wine/dplay # Synced to Wine-1.7.27
|
||||||
|
|
Loading…
Reference in a new issue