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
60948ab1
Commit
60948ab1
authored
Jan 09, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: [joystick_linux] Reuse the same properties array.
parent
3989e0fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
joystick_linux.c
dlls/dinput/joystick_linux.c
+8
-14
No files found.
dlls/dinput/joystick_linux.c
View file @
60948ab1
...
...
@@ -654,7 +654,6 @@ static HRESULT WINAPI JoystickAImpl_SetDataFormat(
{
JoystickImpl
*
This
=
(
JoystickImpl
*
)
iface
;
unsigned
int
i
;
ObjProps
*
new_props
=
0
;
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
This
,
df
);
...
...
@@ -662,13 +661,8 @@ static HRESULT WINAPI JoystickAImpl_SetDataFormat(
hr
=
IDirectInputDevice2AImpl_SetDataFormat
(
iface
,
df
);
if
(
FAILED
(
hr
))
return
hr
;
new_props
=
HeapAlloc
(
GetProcessHeap
(),
0
,
df
->
dwNumObjs
*
sizeof
(
ObjProps
));
if
(
!
new_props
)
return
DIERR_OUTOFMEMORY
;
HeapFree
(
GetProcessHeap
(),
0
,
This
->
props
);
This
->
props
=
new_props
;
for
(
i
=
0
;
i
<
df
->
dwNumObjs
;
i
++
)
{
for
(
i
=
0
;
i
<
This
->
base
.
data_format
.
wine_df
->
dwNumObjs
;
i
++
)
{
This
->
props
[
i
].
lMin
=
0
;
This
->
props
[
i
].
lMax
=
0xffff
;
This
->
props
[
i
].
lDeadZone
=
1000
;
...
...
@@ -925,10 +919,10 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
if
(
!
HIWORD
(
rguid
))
{
switch
(
LOWORD
(
rguid
))
{
case
(
DWORD
)
DIPROP_RANGE
:
{
LPCDIPROPRANGE
pr
=
(
LPCDIPROPRANGE
)
ph
;
LPCDIPROPRANGE
pr
=
(
LPCDIPROPRANGE
)
ph
;
if
(
ph
->
dwHow
==
DIPH_DEVICE
)
{
TRACE
(
"proprange(%d,%d) all
\n
"
,
pr
->
lMin
,
pr
->
lMax
);
for
(
i
=
0
;
i
<
This
->
base
.
data_format
.
user
_df
->
dwNumObjs
;
i
++
)
{
for
(
i
=
0
;
i
<
This
->
base
.
data_format
.
wine
_df
->
dwNumObjs
;
i
++
)
{
This
->
props
[
i
].
lMin
=
pr
->
lMin
;
This
->
props
[
i
].
lMax
=
pr
->
lMax
;
}
...
...
@@ -945,10 +939,10 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
break
;
}
case
(
DWORD
)
DIPROP_DEADZONE
:
{
LPCDIPROPDWORD
pd
=
(
LPCDIPROPDWORD
)
ph
;
LPCDIPROPDWORD
pd
=
(
LPCDIPROPDWORD
)
ph
;
if
(
ph
->
dwHow
==
DIPH_DEVICE
)
{
TRACE
(
"deadzone(%d) all
\n
"
,
pd
->
dwData
);
for
(
i
=
0
;
i
<
This
->
base
.
data_format
.
user
_df
->
dwNumObjs
;
i
++
)
for
(
i
=
0
;
i
<
This
->
base
.
data_format
.
wine
_df
->
dwNumObjs
;
i
++
)
This
->
props
[
i
].
lDeadZone
=
pd
->
dwData
;
}
else
{
int
obj
=
find_property
(
&
This
->
base
.
data_format
,
ph
);
...
...
@@ -962,10 +956,10 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
break
;
}
case
(
DWORD
)
DIPROP_SATURATION
:
{
LPCDIPROPDWORD
pd
=
(
LPCDIPROPDWORD
)
ph
;
LPCDIPROPDWORD
pd
=
(
LPCDIPROPDWORD
)
ph
;
if
(
ph
->
dwHow
==
DIPH_DEVICE
)
{
TRACE
(
"saturation(%d) all
\n
"
,
pd
->
dwData
);
for
(
i
=
0
;
i
<
This
->
base
.
data_format
.
user
_df
->
dwNumObjs
;
i
++
)
for
(
i
=
0
;
i
<
This
->
base
.
data_format
.
wine
_df
->
dwNumObjs
;
i
++
)
This
->
props
[
i
].
lSaturation
=
pd
->
dwData
;
}
else
{
int
obj
=
find_property
(
&
This
->
base
.
data_format
,
ph
);
...
...
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