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
c6784cda
Commit
c6784cda
authored
Aug 25, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Aug 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Count should not be 0-based.
parent
35f3ff87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
joystick_linux.c
dlls/dinput/joystick_linux.c
+4
-3
No files found.
dlls/dinput/joystick_linux.c
View file @
c6784cda
...
...
@@ -138,6 +138,7 @@ static INT find_joystick_devices(void)
if
(
joystick_devices_count
!=
-
1
)
return
joystick_devices_count
;
joystick_devices_count
=
0
;
for
(
i
=
0
;
i
<
MAX_JOYSTICKS
;
i
++
)
{
CHAR
device_name
[
MAX_PATH
],
*
str
;
...
...
@@ -154,7 +155,7 @@ static INT find_joystick_devices(void)
if
(
!
(
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
break
;
memcpy
(
str
,
device_name
,
len
);
joystick_devices
[
++
joystick_devices_count
]
=
str
;
joystick_devices
[
joystick_devices_count
++
]
=
str
;
}
return
joystick_devices_count
;
...
...
@@ -164,7 +165,7 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
{
int
fd
=
-
1
;
if
(
id
>
find_joystick_devices
())
return
FALSE
;
if
(
id
>
=
find_joystick_devices
())
return
FALSE
;
if
(
dwFlags
&
DIEDFL_FORCEFEEDBACK
)
{
WARN
(
"force feedback not supported
\n
"
);
...
...
@@ -215,7 +216,7 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
char
name
[
MAX_PATH
];
char
friendly
[
32
];
if
(
id
>
find_joystick_devices
())
return
FALSE
;
if
(
id
>
=
find_joystick_devices
())
return
FALSE
;
if
(
dwFlags
&
DIEDFL_FORCEFEEDBACK
)
{
WARN
(
"force feedback not supported
\n
"
);
...
...
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