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
11cb3bbf
Commit
11cb3bbf
authored
Apr 29, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Make sure converted direction values are always positive.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
37abfa73
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
27 deletions
+1
-27
joystick_hid.c
dlls/dinput/joystick_hid.c
+1
-0
force_feedback.c
dlls/dinput/tests/force_feedback.c
+0
-27
No files found.
dlls/dinput/joystick_hid.c
View file @
11cb3bbf
...
@@ -2307,6 +2307,7 @@ static void convert_directions_to_spherical( const DIEFFECT *in, DIEFFECT *out )
...
@@ -2307,6 +2307,7 @@ static void convert_directions_to_spherical( const DIEFFECT *in, DIEFFECT *out )
for
(
j
=
1
;
j
<
i
;
++
j
)
tmp
=
sqrt
(
tmp
*
tmp
+
in
->
rglDirection
[
j
]
*
in
->
rglDirection
[
j
]
);
for
(
j
=
1
;
j
<
i
;
++
j
)
tmp
=
sqrt
(
tmp
*
tmp
+
in
->
rglDirection
[
j
]
*
in
->
rglDirection
[
j
]
);
tmp
=
atan2
(
in
->
rglDirection
[
i
],
tmp
);
tmp
=
atan2
(
in
->
rglDirection
[
i
],
tmp
);
out
->
rglDirection
[
i
-
1
]
=
tmp
*
18000
/
M_PI
;
out
->
rglDirection
[
i
-
1
]
=
tmp
*
18000
/
M_PI
;
if
(
out
->
rglDirection
[
i
-
1
]
<
0
)
out
->
rglDirection
[
i
-
1
]
+=
36000
;
}
}
if
(
in
->
cAxes
)
out
->
rglDirection
[
in
->
cAxes
-
1
]
=
0
;
if
(
in
->
cAxes
)
out
->
rglDirection
[
in
->
cAxes
-
1
]
=
0
;
out
->
cAxes
=
in
->
cAxes
;
out
->
cAxes
=
in
->
cAxes
;
...
...
dlls/dinput/tests/force_feedback.c
View file @
11cb3bbf
...
@@ -5480,16 +5480,7 @@ static void test_windows_gaming_input(void)
...
@@ -5480,16 +5480,7 @@ static void test_windows_gaming_input(void)
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_id
=
3
,
.
report_len
=
18
,
.
report_len
=
18
,
.
report_buf
=
{
3
,
0x01
,
0x02
,
0x08
,
0x78
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0xff
,
0xce
,
0x00
,
0x00
,
0x00
},
.
wine_only
=
TRUE
,
.
todo
=
TRUE
,
},
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_len
=
18
,
.
report_buf
=
{
3
,
0x01
,
0x02
,
0x08
,
0x78
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0xff
,
0x4e
,
0x01
,
0x00
,
0x00
},
.
report_buf
=
{
3
,
0x01
,
0x02
,
0x08
,
0x78
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0xff
,
0x4e
,
0x01
,
0x00
,
0x00
},
.
todo
=
TRUE
,
},
},
};
};
struct
hid_expect
expect_create_condition
[]
=
struct
hid_expect
expect_create_condition
[]
=
...
@@ -5558,16 +5549,7 @@ static void test_windows_gaming_input(void)
...
@@ -5558,16 +5549,7 @@ static void test_windows_gaming_input(void)
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_id
=
3
,
.
report_len
=
18
,
.
report_len
=
18
,
.
report_buf
=
{
3
,
0x01
,
0x04
,
0x08
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0x7f
,
0xce
,
0x00
,
0x00
,
0x00
},
.
wine_only
=
TRUE
,
.
todo
=
TRUE
,
},
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_len
=
18
,
.
report_buf
=
{
3
,
0x01
,
0x04
,
0x08
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0x7f
,
0x4e
,
0x01
,
0x00
,
0x00
},
.
report_buf
=
{
3
,
0x01
,
0x04
,
0x08
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0x7f
,
0x4e
,
0x01
,
0x00
,
0x00
},
.
todo
=
TRUE
,
},
},
};
};
struct
hid_expect
expect_create_ramp
[]
=
struct
hid_expect
expect_create_ramp
[]
=
...
@@ -5605,16 +5587,7 @@ static void test_windows_gaming_input(void)
...
@@ -5605,16 +5587,7 @@ static void test_windows_gaming_input(void)
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_id
=
3
,
.
report_len
=
18
,
.
report_len
=
18
,
.
report_buf
=
{
3
,
0x01
,
0x05
,
0x08
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0xff
,
0xce
,
0x00
,
0x00
,
0x00
},
.
wine_only
=
TRUE
,
.
todo
=
TRUE
,
},
{
.
code
=
IOCTL_HID_WRITE_REPORT
,
.
report_id
=
3
,
.
report_len
=
18
,
.
report_buf
=
{
3
,
0x01
,
0x05
,
0x08
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0xff
,
0x4e
,
0x01
,
0x00
,
0x00
},
.
report_buf
=
{
3
,
0x01
,
0x05
,
0x08
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0xff
,
0xff
,
0x4e
,
0x01
,
0x00
,
0x00
},
.
todo
=
TRUE
,
},
},
};
};
struct
hid_expect
expect_effect_start
=
struct
hid_expect
expect_effect_start
=
...
...
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