dinput: Pass interface instead of this pointer to joystick poll callback.
This commit is contained in:
parent
179b862738
commit
7d650d0b28
|
@ -358,7 +358,7 @@ HRESULT WINAPI JoystickAGenericImpl_Poll(LPDIRECTINPUTDEVICE8A iface)
|
||||||
return DIERR_NOTACQUIRED;
|
return DIERR_NOTACQUIRED;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->joy_polldev(This);
|
This->joy_polldev(iface);
|
||||||
return DI_OK;
|
return DI_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ HRESULT WINAPI JoystickAGenericImpl_GetDeviceState(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update joystick state */
|
/* update joystick state */
|
||||||
This->joy_polldev(This);
|
This->joy_polldev(iface);
|
||||||
|
|
||||||
/* convert and copy data to user supplied buffer */
|
/* convert and copy data to user supplied buffer */
|
||||||
fill_DataFormat(ptr, len, &This->js, &This->base.data_format);
|
fill_DataFormat(ptr, len, &This->js, &This->base.data_format);
|
||||||
|
|
|
@ -110,7 +110,7 @@ static const GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903
|
||||||
static INT joystick_devices_count = -1;
|
static INT joystick_devices_count = -1;
|
||||||
static struct JoyDev *joystick_devices;
|
static struct JoyDev *joystick_devices;
|
||||||
|
|
||||||
static void joy_polldev(JoystickGenericImpl *This);
|
static void joy_polldev(LPDIRECTINPUTDEVICE8A iface);
|
||||||
|
|
||||||
static INT find_joystick_devices(void)
|
static INT find_joystick_devices(void)
|
||||||
{
|
{
|
||||||
|
@ -544,10 +544,11 @@ static HRESULT WINAPI JoystickLinuxAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
|
||||||
return DI_NOEFFECT;
|
return DI_NOEFFECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void joy_polldev(JoystickGenericImpl *This_in) {
|
static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
|
||||||
|
{
|
||||||
struct pollfd plfd;
|
struct pollfd plfd;
|
||||||
struct js_event jse;
|
struct js_event jse;
|
||||||
JoystickImpl *This = (JoystickImpl*) This_in;
|
JoystickImpl *This = (JoystickImpl*) iface;
|
||||||
|
|
||||||
TRACE("(%p)\n", This);
|
TRACE("(%p)\n", This);
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ struct JoystickImpl
|
||||||
|
|
||||||
static void fake_current_js_state(JoystickImpl *ji);
|
static void fake_current_js_state(JoystickImpl *ji);
|
||||||
static void find_joydevs(void);
|
static void find_joydevs(void);
|
||||||
static void joy_polldev(JoystickGenericImpl *This);
|
static void joy_polldev(LPDIRECTINPUTDEVICE8A iface);
|
||||||
|
|
||||||
/* This GUID is slightly different from the linux joystick one. Take note. */
|
/* This GUID is slightly different from the linux joystick one. Take note. */
|
||||||
static const GUID DInput_Wine_Joystick_Base_GUID = { /* 9e573eda-7734-11d2-8d4a-23903fb6bdf7 */
|
static const GUID DInput_Wine_Joystick_Base_GUID = { /* 9e573eda-7734-11d2-8d4a-23903fb6bdf7 */
|
||||||
|
@ -731,7 +731,7 @@ static void fake_current_js_state(JoystickImpl *ji)
|
||||||
#undef CENTER_AXIS
|
#undef CENTER_AXIS
|
||||||
|
|
||||||
/* convert wine format offset to user format object index */
|
/* convert wine format offset to user format object index */
|
||||||
static void joy_polldev(JoystickGenericImpl *iface)
|
static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
|
||||||
{
|
{
|
||||||
struct pollfd plfd;
|
struct pollfd plfd;
|
||||||
struct input_event ie;
|
struct input_event ie;
|
||||||
|
|
|
@ -517,9 +517,9 @@ static void get_osx_device_elements_props(JoystickImpl *device)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void poll_osx_device_state(JoystickGenericImpl *device_in)
|
static void poll_osx_device_state(LPDIRECTINPUTDEVICE8A iface)
|
||||||
{
|
{
|
||||||
JoystickImpl *device = (JoystickImpl*)device_in;
|
JoystickImpl *device = (JoystickImpl*)iface;
|
||||||
IOHIDElementRef tIOHIDTopElementRef;
|
IOHIDElementRef tIOHIDTopElementRef;
|
||||||
IOHIDDeviceRef tIOHIDDeviceRef;
|
IOHIDDeviceRef tIOHIDDeviceRef;
|
||||||
CFArrayRef gElementCFArrayRef = device->elementCFArrayRef;
|
CFArrayRef gElementCFArrayRef = device->elementCFArrayRef;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#define MAX_PROPS 164
|
#define MAX_PROPS 164
|
||||||
struct JoystickGenericImpl;
|
struct JoystickGenericImpl;
|
||||||
|
|
||||||
typedef void joy_polldev_handler(struct JoystickGenericImpl *This);
|
typedef void joy_polldev_handler(LPDIRECTINPUTDEVICE8A iface);
|
||||||
|
|
||||||
typedef struct JoystickGenericImpl
|
typedef struct JoystickGenericImpl
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue