Commit 7d650d0b authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Pass interface instead of this pointer to joystick poll callback.

parent 179b8627
......@@ -358,7 +358,7 @@ HRESULT WINAPI JoystickAGenericImpl_Poll(LPDIRECTINPUTDEVICE8A iface)
return DIERR_NOTACQUIRED;
}
This->joy_polldev(This);
This->joy_polldev(iface);
return DI_OK;
}
......@@ -381,7 +381,7 @@ HRESULT WINAPI JoystickAGenericImpl_GetDeviceState(
}
/* update joystick state */
This->joy_polldev(This);
This->joy_polldev(iface);
/* convert and copy data to user supplied buffer */
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 struct JoyDev *joystick_devices;
static void joy_polldev(JoystickGenericImpl *This);
static void joy_polldev(LPDIRECTINPUTDEVICE8A iface);
static INT find_joystick_devices(void)
{
......@@ -544,10 +544,11 @@ static HRESULT WINAPI JoystickLinuxAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
return DI_NOEFFECT;
}
static void joy_polldev(JoystickGenericImpl *This_in) {
static void joy_polldev(LPDIRECTINPUTDEVICE8A iface)
{
struct pollfd plfd;
struct js_event jse;
JoystickImpl *This = (JoystickImpl*) This_in;
struct js_event jse;
JoystickImpl *This = (JoystickImpl*) iface;
TRACE("(%p)\n", This);
......
......@@ -135,7 +135,7 @@ struct JoystickImpl
static void fake_current_js_state(JoystickImpl *ji);
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. */
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
/* 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 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;
IOHIDDeviceRef tIOHIDDeviceRef;
CFArrayRef gElementCFArrayRef = device->elementCFArrayRef;
......
......@@ -33,7 +33,7 @@
#define MAX_PROPS 164
struct JoystickGenericImpl;
typedef void joy_polldev_handler(struct JoystickGenericImpl *This);
typedef void joy_polldev_handler(LPDIRECTINPUTDEVICE8A iface);
typedef struct JoystickGenericImpl
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment