Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2665272d
Commit
2665272d
authored
Nov 29, 2009
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Nov 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Pass event instance ID to queue_event instead of offset.
parent
29561f49
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
11 deletions
+9
-11
device.c
dlls/dinput/device.c
+2
-2
device_private.h
dlls/dinput/device_private.h
+1
-1
joystick_linux.c
dlls/dinput/joystick_linux.c
+1
-2
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+1
-2
keyboard.c
dlls/dinput/keyboard.c
+2
-2
mouse.c
dlls/dinput/mouse.c
+2
-2
No files found.
dlls/dinput/device.c
View file @
2665272d
...
@@ -533,10 +533,10 @@ int find_property(const DataFormat *df, LPCDIPROPHEADER ph)
...
@@ -533,10 +533,10 @@ int find_property(const DataFormat *df, LPCDIPROPHEADER ph)
* queue_event - add new event to the ring queue
* queue_event - add new event to the ring queue
*/
*/
void
queue_event
(
LPDIRECTINPUTDEVICE8A
iface
,
int
ofs
,
DWORD
data
,
DWORD
time
,
DWORD
seq
)
void
queue_event
(
LPDIRECTINPUTDEVICE8A
iface
,
int
inst_id
,
DWORD
data
,
DWORD
time
,
DWORD
seq
)
{
{
IDirectInputDevice2AImpl
*
This
=
(
IDirectInputDevice2AImpl
*
)
iface
;
IDirectInputDevice2AImpl
*
This
=
(
IDirectInputDevice2AImpl
*
)
iface
;
int
next_pos
;
int
next_pos
,
ofs
=
id_to_offset
(
&
This
->
data_format
,
inst_id
)
;
/* Event is being set regardless of the queue state */
/* Event is being set regardless of the queue state */
if
(
This
->
hEvent
)
SetEvent
(
This
->
hEvent
);
if
(
This
->
hEvent
)
SetEvent
(
This
->
hEvent
);
...
...
dlls/dinput/device_private.h
View file @
2665272d
...
@@ -78,7 +78,7 @@ extern DWORD get_config_key(HKEY, HKEY, const char*, char*, DWORD);
...
@@ -78,7 +78,7 @@ extern DWORD get_config_key(HKEY, HKEY, const char*, char*, DWORD);
/* Routines to do DataFormat / WineFormat conversions */
/* Routines to do DataFormat / WineFormat conversions */
extern
void
fill_DataFormat
(
void
*
out
,
DWORD
size
,
const
void
*
in
,
const
DataFormat
*
df
)
;
extern
void
fill_DataFormat
(
void
*
out
,
DWORD
size
,
const
void
*
in
,
const
DataFormat
*
df
)
;
extern
void
release_DataFormat
(
DataFormat
*
df
)
;
extern
void
release_DataFormat
(
DataFormat
*
df
)
;
extern
void
queue_event
(
LPDIRECTINPUTDEVICE8A
iface
,
int
ofs
,
DWORD
data
,
DWORD
time
,
DWORD
seq
);
extern
void
queue_event
(
LPDIRECTINPUTDEVICE8A
iface
,
int
inst_id
,
DWORD
data
,
DWORD
time
,
DWORD
seq
);
/* Helper functions to work with data format */
/* Helper functions to work with data format */
extern
int
id_to_object
(
LPCDIDATAFORMAT
df
,
int
id
);
extern
int
id_to_object
(
LPCDIDATAFORMAT
df
,
int
id
);
extern
int
id_to_offset
(
const
DataFormat
*
df
,
int
id
);
extern
int
id_to_offset
(
const
DataFormat
*
df
,
int
id
);
...
...
dlls/dinput/joystick_linux.c
View file @
2665272d
...
@@ -614,8 +614,7 @@ static void joy_polldev(JoystickGenericImpl *This_in) {
...
@@ -614,8 +614,7 @@ static void joy_polldev(JoystickGenericImpl *This_in) {
}
}
}
}
if
(
inst_id
>=
0
)
if
(
inst_id
>=
0
)
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
inst_id
,
id_to_offset
(
&
This
->
generic
.
base
.
data_format
,
inst_id
),
value
,
jse
.
time
,
This
->
generic
.
base
.
dinput
->
evsequence
++
);
value
,
jse
.
time
,
This
->
generic
.
base
.
dinput
->
evsequence
++
);
}
}
}
}
...
...
dlls/dinput/joystick_linuxinput.c
View file @
2665272d
...
@@ -824,8 +824,7 @@ static void joy_polldev(JoystickGenericImpl *iface)
...
@@ -824,8 +824,7 @@ static void joy_polldev(JoystickGenericImpl *iface)
break
;
break
;
}
}
if
(
inst_id
>=
0
)
if
(
inst_id
>=
0
)
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
inst_id
,
id_to_offset
(
&
This
->
generic
.
base
.
data_format
,
inst_id
),
value
,
ie
.
time
.
tv_usec
,
This
->
generic
.
base
.
dinput
->
evsequence
++
);
value
,
ie
.
time
.
tv_usec
,
This
->
generic
.
base
.
dinput
->
evsequence
++
);
}
}
}
}
...
...
dlls/dinput/keyboard.c
View file @
2665272d
...
@@ -107,9 +107,9 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
...
@@ -107,9 +107,9 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
This
->
DInputKeyState
[
dik_code
]
=
new_diks
;
This
->
DInputKeyState
[
dik_code
]
=
new_diks
;
TRACE
(
" setting %02X to %02X
\n
"
,
dik_code
,
This
->
DInputKeyState
[
dik_code
]);
TRACE
(
" setting %02X to %02X
\n
"
,
dik_code
,
This
->
DInputKeyState
[
dik_code
]);
dik_code
=
id_to_offset
(
&
This
->
base
.
data_format
,
DIDFT_MAKEINSTANCE
(
dik_code
)
|
DIDFT_PSHBUTTON
);
EnterCriticalSection
(
&
This
->
base
.
crit
);
EnterCriticalSection
(
&
This
->
base
.
crit
);
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
dik_code
,
new_diks
,
hook
->
time
,
This
->
base
.
dinput
->
evsequence
++
);
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
DIDFT_MAKEINSTANCE
(
dik_code
)
|
DIDFT_PSHBUTTON
,
new_diks
,
hook
->
time
,
This
->
base
.
dinput
->
evsequence
++
);
LeaveCriticalSection
(
&
This
->
base
.
crit
);
LeaveCriticalSection
(
&
This
->
base
.
crit
);
return
ret
;
return
ret
;
...
...
dlls/dinput/mouse.c
View file @
2665272d
...
@@ -324,7 +324,7 @@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
...
@@ -324,7 +324,7 @@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
{
{
/* Already have X, need to queue it */
/* Already have X, need to queue it */
if
(
inst_id
!=
-
1
)
if
(
inst_id
!=
-
1
)
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
i
d_to_offset
(
&
This
->
base
.
data_format
,
inst_id
)
,
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
i
nst_id
,
wdata
,
GetCurrentTime
(),
This
->
base
.
dinput
->
evsequence
);
wdata
,
GetCurrentTime
(),
This
->
base
.
dinput
->
evsequence
);
inst_id
=
DIDFT_MAKEINSTANCE
(
WINE_MOUSE_Y_AXIS_INSTANCE
)
|
DIDFT_RELAXIS
;
inst_id
=
DIDFT_MAKEINSTANCE
(
WINE_MOUSE_Y_AXIS_INSTANCE
)
|
DIDFT_RELAXIS
;
wdata
=
pt1
.
y
;
wdata
=
pt1
.
y
;
...
@@ -379,7 +379,7 @@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
...
@@ -379,7 +379,7 @@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
if
(
inst_id
!=
-
1
)
if
(
inst_id
!=
-
1
)
{
{
_dump_mouse_state
(
&
This
->
m_state
);
_dump_mouse_state
(
&
This
->
m_state
);
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
i
d_to_offset
(
&
This
->
base
.
data_format
,
inst_id
)
,
queue_event
((
LPDIRECTINPUTDEVICE8A
)
This
,
i
nst_id
,
wdata
,
GetCurrentTime
(),
This
->
base
.
dinput
->
evsequence
++
);
wdata
,
GetCurrentTime
(),
This
->
base
.
dinput
->
evsequence
++
);
}
}
...
...
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