Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7d650d0b
Commit
7d650d0b
authored
Jan 03, 2011
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Pass interface instead of this pointer to joystick poll callback.
parent
179b8627
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
10 deletions
+11
-10
joystick.c
dlls/dinput/joystick.c
+2
-2
joystick_linux.c
dlls/dinput/joystick_linux.c
+4
-3
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+2
-2
joystick_osx.c
dlls/dinput/joystick_osx.c
+2
-2
joystick_private.h
dlls/dinput/joystick_private.h
+1
-1
No files found.
dlls/dinput/joystick.c
View file @
7d650d0b
...
@@ -358,7 +358,7 @@ HRESULT WINAPI JoystickAGenericImpl_Poll(LPDIRECTINPUTDEVICE8A iface)
...
@@ -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(
...
@@ -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
);
...
...
dlls/dinput/joystick_linux.c
View file @
7d650d0b
...
@@ -110,7 +110,7 @@ static const GUID DInput_Wine_Joystick_GUID = { /* 9e573ed9-7734-11d2-8d4a-23903
...
@@ -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)
...
@@ -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
);
...
...
dlls/dinput/joystick_linuxinput.c
View file @
7d650d0b
...
@@ -135,7 +135,7 @@ struct JoystickImpl
...
@@ -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)
...
@@ -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
;
...
...
dlls/dinput/joystick_osx.c
View file @
7d650d0b
...
@@ -517,9 +517,9 @@ static void get_osx_device_elements_props(JoystickImpl *device)
...
@@ -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
;
...
...
dlls/dinput/joystick_private.h
View file @
7d650d0b
...
@@ -33,7 +33,7 @@
...
@@ -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
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment