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
b07ff6ec
Commit
b07ff6ec
authored
May 03, 2008
by
Vitaliy Margolen
Committed by
Alexandre Julliard
May 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Remove redundant variable.
parent
493b6915
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
joystick_linux.c
dlls/dinput/joystick_linux.c
+7
-9
No files found.
dlls/dinput/joystick_linux.c
View file @
b07ff6ec
...
@@ -93,7 +93,6 @@ struct JoystickImpl
...
@@ -93,7 +93,6 @@ struct JoystickImpl
LONG
deadzone
;
LONG
deadzone
;
int
*
axis_map
;
int
*
axis_map
;
int
axes
;
int
axes
;
int
buttons
;
POINTL
povs
[
4
];
POINTL
povs
[
4
];
};
};
...
@@ -428,9 +427,9 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
...
@@ -428,9 +427,9 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
}
}
#endif
#endif
#ifdef JSIOCGBUTTONS
#ifdef JSIOCGBUTTONS
if
(
ioctl
(
newDevice
->
joyfd
,
JSIOCGBUTTONS
,
&
newDevice
->
b
uttons
)
<
0
)
{
if
(
ioctl
(
newDevice
->
joyfd
,
JSIOCGBUTTONS
,
&
newDevice
->
devcaps
.
dwB
uttons
)
<
0
)
{
WARN
(
"ioctl(%s,JSIOCGBUTTONS) failed: %s, defauting to 2
\n
"
,
newDevice
->
dev
,
strerror
(
errno
));
WARN
(
"ioctl(%s,JSIOCGBUTTONS) failed: %s, defauting to 2
\n
"
,
newDevice
->
dev
,
strerror
(
errno
));
newDevice
->
b
uttons
=
2
;
newDevice
->
devcaps
.
dwB
uttons
=
2
;
}
}
#endif
#endif
...
@@ -441,10 +440,10 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
...
@@ -441,10 +440,10 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
newDevice
->
axes
=
16
;
newDevice
->
axes
=
16
;
}
}
if
(
newDevice
->
b
uttons
>
128
)
if
(
newDevice
->
devcaps
.
dwB
uttons
>
128
)
{
{
WARN
(
"Can't support %d buttons. Clamping down to 128
\n
"
,
newDevice
->
b
uttons
);
WARN
(
"Can't support %d buttons. Clamping down to 128
\n
"
,
newDevice
->
devcaps
.
dwB
uttons
);
newDevice
->
b
uttons
=
128
;
newDevice
->
devcaps
.
dwB
uttons
=
128
;
}
}
newDevice
->
base
.
lpVtbl
=
jvt
;
newDevice
->
base
.
lpVtbl
=
jvt
;
...
@@ -456,7 +455,6 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
...
@@ -456,7 +455,6 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
/* setup_dinput_options may change these */
/* setup_dinput_options may change these */
newDevice
->
deadzone
=
0
;
newDevice
->
deadzone
=
0
;
newDevice
->
devcaps
.
dwButtons
=
newDevice
->
buttons
;
/* do any user specified configuration */
/* do any user specified configuration */
hr
=
setup_dinput_options
(
newDevice
);
hr
=
setup_dinput_options
(
newDevice
);
...
@@ -467,7 +465,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
...
@@ -467,7 +465,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
if
(
!
(
df
=
HeapAlloc
(
GetProcessHeap
(),
0
,
c_dfDIJoystick2
.
dwSize
)))
goto
FAILED
;
if
(
!
(
df
=
HeapAlloc
(
GetProcessHeap
(),
0
,
c_dfDIJoystick2
.
dwSize
)))
goto
FAILED
;
memcpy
(
df
,
&
c_dfDIJoystick2
,
c_dfDIJoystick2
.
dwSize
);
memcpy
(
df
,
&
c_dfDIJoystick2
,
c_dfDIJoystick2
.
dwSize
);
df
->
dwNumObjs
=
newDevice
->
devcaps
.
dwAxes
+
newDevice
->
devcaps
.
dwPOVs
+
newDevice
->
b
uttons
;
df
->
dwNumObjs
=
newDevice
->
devcaps
.
dwAxes
+
newDevice
->
devcaps
.
dwPOVs
+
newDevice
->
devcaps
.
dwB
uttons
;
if
(
!
(
df
->
rgodf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
df
->
dwNumObjs
*
df
->
dwObjSize
)))
goto
FAILED
;
if
(
!
(
df
->
rgodf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
df
->
dwNumObjs
*
df
->
dwObjSize
)))
goto
FAILED
;
for
(
i
=
0
;
i
<
newDevice
->
axes
;
i
++
)
for
(
i
=
0
;
i
<
newDevice
->
axes
;
i
++
)
...
@@ -483,7 +481,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
...
@@ -483,7 +481,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
i
++
;
/* POV takes 2 axes */
i
++
;
/* POV takes 2 axes */
}
}
}
}
for
(
i
=
0
;
i
<
newDevice
->
b
uttons
;
i
++
)
for
(
i
=
0
;
i
<
newDevice
->
devcaps
.
dwB
uttons
;
i
++
)
{
{
memcpy
(
&
df
->
rgodf
[
idx
],
&
c_dfDIJoystick2
.
rgodf
[
i
+
12
],
df
->
dwObjSize
);
memcpy
(
&
df
->
rgodf
[
idx
],
&
c_dfDIJoystick2
.
rgodf
[
i
+
12
],
df
->
dwObjSize
);
df
->
rgodf
[
idx
].
pguid
=
&
GUID_Button
;
df
->
rgodf
[
idx
].
pguid
=
&
GUID_Button
;
...
...
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