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
0855a6be
Commit
0855a6be
authored
Jan 15, 2007
by
Christoph Frick
Committed by
Alexandre Julliard
Jan 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Move the config for the buttons from the JoyDev into the JoystickImpl.
parent
424d3021
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+6
-13
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
0855a6be
...
...
@@ -111,8 +111,6 @@ struct JoyDev {
/* data returned by the EVIOCGABS() ioctl */
int
axes
[
ABS_MAX
][
5
];
/* LUT for KEY_ to offset in rgbButtons */
BYTE
buttons
[
KEY_MAX
];
};
struct
ObjProps
...
...
@@ -142,6 +140,9 @@ struct JoystickImpl
struct
ObjProps
props
[
ABS_MAX
];
/* LUT for KEY_ to offset in rgbButtons */
BYTE
buttons
[
KEY_MAX
];
/* Force feedback variables */
EffectListItem
*
top_effect
;
int
ff_state
;
...
...
@@ -181,7 +182,7 @@ static void find_joydevs(void)
struct
JoyDev
joydev
=
{
0
};
int
fd
;
int
no_ff_check
=
0
;
int
j
,
buttons
;
int
j
;
snprintf
(
buf
,
MAX_PATH
,
EVDEVPREFIX
"%d"
,
i
);
buf
[
MAX_PATH
-
1
]
=
0
;
...
...
@@ -262,15 +263,6 @@ static void find_joydevs(void)
}
}
buttons
=
0
;
for
(
j
=
0
;
j
<
KEY_MAX
;
j
++
)
{
if
(
test_bit
(
joydev
.
keybits
,
j
))
{
TRACE
(
" ... with button %d: %d
\n
"
,
j
,
buttons
);
joydev
.
buttons
[
j
]
=
0x80
|
buttons
;
buttons
++
;
}
}
if
(
have_joydevs
==
0
)
{
joydevs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
JoyDev
));
}
else
{
...
...
@@ -417,6 +409,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm
if
(
!
test_bit
(
newDevice
->
joydev
->
keybits
,
i
))
continue
;
memcpy
(
&
df
->
rgodf
[
idx
],
&
c_dfDIJoystick2
.
rgodf
[
btn
+
WINE_JOYSTICK_BUTTON_BASE
],
df
->
dwObjSize
);
newDevice
->
buttons
[
i
]
=
0x80
|
btn
;
df
->
rgodf
[
idx
++
].
dwType
=
DIDFT_MAKEINSTANCE
(
btn
++
)
|
DIDFT_PSHBUTTON
;
}
df
->
dwNumObjs
=
idx
;
...
...
@@ -723,7 +716,7 @@ static void joy_polldev(JoystickImpl *This)
switch
(
ie
.
type
)
{
case
EV_KEY
:
/* button */
{
int
btn
=
This
->
joydev
->
buttons
[
ie
.
code
];
int
btn
=
This
->
buttons
[
ie
.
code
];
TRACE
(
"(%p) %d -> %d
\n
"
,
This
,
ie
.
code
,
btn
);
if
(
btn
&
0x80
)
...
...
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