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
ff771e2e
Commit
ff771e2e
authored
Sep 06, 2005
by
Daniel Remenak
Committed by
Alexandre Julliard
Sep 06, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Allow enumeration of objects when the device is not yet acquired.
- Flag FF-capable axes during enumeration.
parent
b379e420
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+23
-8
No files found.
dlls/dinput/joystick_linuxinput.c
View file @
ff771e2e
...
...
@@ -912,7 +912,6 @@ static HRESULT WINAPI JoystickAImpl_EnumObjects(
DIDEVICEOBJECTINSTANCEA
ddoi
;
int
xfd
=
This
->
joyfd
;
TRACE
(
"(this=%p,%p,%p,%08lx)
\n
"
,
This
,
lpCallback
,
lpvRef
,
dwFlags
);
if
(
TRACE_ON
(
dinput
))
{
TRACE
(
" - flags = "
);
...
...
@@ -920,7 +919,9 @@ static HRESULT WINAPI JoystickAImpl_EnumObjects(
TRACE
(
"
\n
"
);
}
if
(
xfd
==
-
1
)
return
DIERR_NOTACQUIRED
;
/* We need to work even if we're not yet acquired */
if
(
xfd
==
-
1
)
iface
->
lpVtbl
->
Acquire
(
iface
);
/* Only the fields till dwFFMaxForce are relevant */
ddoi
.
dwSize
=
FIELD_OFFSET
(
DIDEVICEOBJECTINSTANCEA
,
dwFFMaxForce
);
...
...
@@ -971,10 +972,19 @@ static HRESULT WINAPI JoystickAImpl_EnumObjects(
FIXME
(
"unhandled abs axis %d, ignoring!
\n
"
,
i
);
}
ddoi
.
dwType
=
DIDFT_MAKEINSTANCE
((
1
<<
i
)
<<
WINE_JOYSTICK_AXIS_BASE
)
|
DIDFT_ABSAXIS
;
/* Linux event force feedback supports only (and always) x and y axes */
if
(
i
==
ABS_X
||
i
==
ABS_Y
)
{
if
(
This
->
has_ff
)
ddoi
.
dwFlags
|=
DIDOI_FFACTUATOR
;
}
sprintf
(
ddoi
.
tszName
,
"%d-Axis"
,
i
);
_dump_OBJECTINSTANCEA
(
&
ddoi
);
if
(
lpCallback
(
&
ddoi
,
lpvRef
)
!=
DIENUM_CONTINUE
)
return
DI_OK
;
if
(
lpCallback
(
&
ddoi
,
lpvRef
)
!=
DIENUM_CONTINUE
)
{
/* return to unaquired state if that's where we were */
if
(
xfd
==
-
1
)
iface
->
lpVtbl
->
Unacquire
(
iface
);
return
DI_OK
;
}
}
}
...
...
@@ -1057,13 +1067,18 @@ static HRESULT WINAPI JoystickAImpl_EnumObjects(
}
sprintf
(
ddoi
.
tszName
,
"%d-Button"
,
i
);
_dump_OBJECTINSTANCEA
(
&
ddoi
);
if
(
lpCallback
(
&
ddoi
,
lpvRef
)
!=
DIENUM_CONTINUE
)
return
DI_OK
;
if
(
lpCallback
(
&
ddoi
,
lpvRef
)
!=
DIENUM_CONTINUE
)
{
/* return to unaquired state if that's where we were */
if
(
xfd
==
-
1
)
iface
->
lpVtbl
->
Unacquire
(
iface
);
return
DI_OK
;
}
}
}
if
(
xfd
!=
This
->
joyfd
)
close
(
xfd
);
/* return to unaquired state if that's where we were */
if
(
xfd
==
-
1
)
iface
->
lpVtbl
->
Unacquire
(
iface
);
return
DI_OK
;
}
...
...
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