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
22a6983a
Commit
22a6983a
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: Rename 'axe' to 'axis'.
parent
867ebe4d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+26
-26
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
22a6983a
...
...
@@ -103,18 +103,18 @@ struct JoyDev {
BYTE
keybits
[(
KEY_MAX
+
7
)
/
8
];
BYTE
ffbits
[(
FF_MAX
+
7
)
/
8
];
#define AX
E_ABS
0
#define AX
E_ABSMIN
1
#define AX
E_ABSMAX
2
#define AX
E_ABSFUZZ
3
#define AX
E_ABSFLAT
4
#define AX
IS_ABS
0
#define AX
IS_ABSMIN
1
#define AX
IS_ABSMAX
2
#define AX
IS_ABSFUZZ
3
#define AX
IS_ABSFLAT
4
/* data returned by the EVIOCGABS() ioctl */
int
axes
[
ABS_MAX
][
5
];
/* LUT for KEY_ to offset in rgbButtons */
BYTE
buttons
[
KEY_MAX
];
/* autodetecting ranges per ax
e
by following movement */
/* autodetecting ranges per ax
is
by following movement */
LONG
havemax
[
ABS_MAX
];
LONG
havemin
[
ABS_MAX
];
};
...
...
@@ -246,16 +246,16 @@ static void find_joydevs(void)
for
(
j
=
0
;
j
<
ABS_MAX
;
j
++
)
{
if
(
test_bit
(
joydev
.
absbits
,
j
))
{
if
(
-
1
!=
ioctl
(
fd
,
EVIOCGABS
(
j
),
&
(
joydev
.
axes
[
j
])))
{
TRACE
(
" ... with ax
e
%d: cur=%d, min=%d, max=%d, fuzz=%d, flat=%d
\n
"
,
TRACE
(
" ... with ax
is
%d: cur=%d, min=%d, max=%d, fuzz=%d, flat=%d
\n
"
,
j
,
joydev
.
axes
[
j
][
AX
E
_ABS
],
joydev
.
axes
[
j
][
AX
E
_ABSMIN
],
joydev
.
axes
[
j
][
AX
E
_ABSMAX
],
joydev
.
axes
[
j
][
AX
E
_ABSFUZZ
],
joydev
.
axes
[
j
][
AX
E
_ABSFLAT
]
joydev
.
axes
[
j
][
AX
IS
_ABS
],
joydev
.
axes
[
j
][
AX
IS
_ABSMIN
],
joydev
.
axes
[
j
][
AX
IS
_ABSMAX
],
joydev
.
axes
[
j
][
AX
IS
_ABSFUZZ
],
joydev
.
axes
[
j
][
AX
IS
_ABSFLAT
]
);
joydev
.
havemin
[
j
]
=
joydev
.
axes
[
j
][
AX
E
_ABSMIN
];
joydev
.
havemax
[
j
]
=
joydev
.
axes
[
j
][
AX
E
_ABSMAX
];
joydev
.
havemin
[
j
]
=
joydev
.
axes
[
j
][
AX
IS
_ABSMIN
];
joydev
.
havemax
[
j
]
=
joydev
.
axes
[
j
][
AX
IS
_ABSMAX
];
}
}
}
...
...
@@ -578,13 +578,13 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
/*
* This maps the read value (from the input event) to a value in the
* 'wanted' range. It also autodetects the possible range of the ax
e
and
* 'wanted' range. It also autodetects the possible range of the ax
is
and
* adapts values accordingly.
*/
static
int
map_axis
(
JoystickImpl
*
This
,
int
axis
,
int
val
)
{
int
xmin
=
This
->
joydev
->
axes
[
axis
][
AX
E
_ABSMIN
];
int
xmax
=
This
->
joydev
->
axes
[
axis
][
AX
E
_ABSMAX
];
int
xmin
=
This
->
joydev
->
axes
[
axis
][
AX
IS
_ABSMIN
];
int
xmax
=
This
->
joydev
->
axes
[
axis
][
AX
IS
_ABSMAX
];
int
hmax
=
This
->
joydev
->
havemax
[
axis
];
int
hmin
=
This
->
joydev
->
havemin
[
axis
];
int
wmin
=
This
->
wantmin
[
axis
];
...
...
@@ -619,14 +619,14 @@ static void fake_current_js_state(JoystickImpl *ji)
{
int
i
;
/* center the axes */
ji
->
js
.
lX
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_X
)
?
map_axis
(
ji
,
ABS_X
,
ji
->
joydev
->
axes
[
ABS_X
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
lY
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_Y
)
?
map_axis
(
ji
,
ABS_Y
,
ji
->
joydev
->
axes
[
ABS_Y
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
lZ
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_Z
)
?
map_axis
(
ji
,
ABS_Z
,
ji
->
joydev
->
axes
[
ABS_Z
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
lRx
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RX
)
?
map_axis
(
ji
,
ABS_RX
,
ji
->
joydev
->
axes
[
ABS_RX
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
lRy
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RY
)
?
map_axis
(
ji
,
ABS_RY
,
ji
->
joydev
->
axes
[
ABS_RY
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
lRz
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RZ
)
?
map_axis
(
ji
,
ABS_RZ
,
ji
->
joydev
->
axes
[
ABS_RZ
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
rglSlider
[
0
]
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_THROTTLE
)
?
map_axis
(
ji
,
ABS_THROTTLE
,
ji
->
joydev
->
axes
[
ABS_THROTTLE
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
rglSlider
[
1
]
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RUDDER
)
?
map_axis
(
ji
,
ABS_RUDDER
,
ji
->
joydev
->
axes
[
ABS_RUDDER
][
AX
E
_ABS
])
:
0
;
ji
->
js
.
lX
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_X
)
?
map_axis
(
ji
,
ABS_X
,
ji
->
joydev
->
axes
[
ABS_X
][
AX
IS
_ABS
])
:
0
;
ji
->
js
.
lY
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_Y
)
?
map_axis
(
ji
,
ABS_Y
,
ji
->
joydev
->
axes
[
ABS_Y
][
AX
IS
_ABS
])
:
0
;
ji
->
js
.
lZ
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_Z
)
?
map_axis
(
ji
,
ABS_Z
,
ji
->
joydev
->
axes
[
ABS_Z
][
AX
IS
_ABS
])
:
0
;
ji
->
js
.
lRx
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RX
)
?
map_axis
(
ji
,
ABS_RX
,
ji
->
joydev
->
axes
[
ABS_RX
][
AX
IS
_ABS
])
:
0
;
ji
->
js
.
lRy
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RY
)
?
map_axis
(
ji
,
ABS_RY
,
ji
->
joydev
->
axes
[
ABS_RY
][
AX
IS
_ABS
])
:
0
;
ji
->
js
.
lRz
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RZ
)
?
map_axis
(
ji
,
ABS_RZ
,
ji
->
joydev
->
axes
[
ABS_RZ
][
AX
IS
_ABS
])
:
0
;
ji
->
js
.
rglSlider
[
0
]
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_THROTTLE
)
?
map_axis
(
ji
,
ABS_THROTTLE
,
ji
->
joydev
->
axes
[
ABS_THROTTLE
][
AX
IS
_ABS
])
:
0
;
ji
->
js
.
rglSlider
[
1
]
=
test_bit
(
ji
->
joydev
->
absbits
,
ABS_RUDDER
)
?
map_axis
(
ji
,
ABS_RUDDER
,
ji
->
joydev
->
axes
[
ABS_RUDDER
][
AX
IS
_ABS
])
:
0
;
/* POV center is -1 */
for
(
i
=
0
;
i
<
4
;
i
++
)
{
ji
->
js
.
rgdwPOV
[
i
]
=
-
1
;
...
...
@@ -768,7 +768,7 @@ static void joy_polldev(JoystickImpl *This)
This
->
js
.
rgdwPOV
[
3
]
=
value
=
map_pov
(
ie
.
value
,
ie
.
code
==
ABS_HAT3X
);
break
;
default:
FIXME
(
"unhandled joystick ax
e
event (code %d, value %d)
\n
"
,
ie
.
code
,
ie
.
value
);
FIXME
(
"unhandled joystick ax
is
event (code %d, value %d)
\n
"
,
ie
.
code
,
ie
.
value
);
break
;
}
break
;
...
...
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