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
feb9ab68
Commit
feb9ab68
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 the creation of an FF effect while the joystick is not
acquired. - Failing to download an effect after setting parameters is not a fatal error.
parent
d1682198
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
effect_linuxinput.c
dlls/dinput/effect_linuxinput.c
+7
-7
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+3
-3
No files found.
dlls/dinput/effect_linuxinput.c
View file @
feb9ab68
...
...
@@ -54,7 +54,7 @@ struct LinuxInputEffectImpl
struct
ff_effect
effect
;
/* Parent device */
int
fd
;
int
*
fd
;
};
...
...
@@ -254,7 +254,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Download(
TRACE
(
"(this=%p)
\n
"
,
This
);
if
(
ioctl
(
This
->
fd
,
EVIOCSFF
,
&
This
->
effect
)
==
-
1
)
{
if
(
ioctl
(
*
(
This
->
fd
)
,
EVIOCSFF
,
&
This
->
effect
)
==
-
1
)
{
if
(
errno
==
ENOMEM
)
{
return
DIERR_DEVICEFULL
;
}
else
{
...
...
@@ -516,7 +516,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
event
.
type
=
EV_FF
;
event
.
code
=
This
->
effect
.
id
;
event
.
value
=
dwIterations
;
if
(
write
(
This
->
fd
,
&
event
,
sizeof
(
event
))
==
-
1
)
{
if
(
write
(
*
(
This
->
fd
)
,
&
event
,
sizeof
(
event
))
==
-
1
)
{
FIXME
(
"Unable to write event. Assuming device disconnected.
\n
"
);
return
DIERR_INPUTLOST
;
}
...
...
@@ -708,7 +708,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
if
(
!
(
dwFlags
&
DIEP_NODOWNLOAD
))
retval
=
LinuxInputEffectImpl_Download
(
iface
);
if
(
retval
!=
DI_OK
)
return
retval
;
return
DI_DOWNLOADSKIPPED
;
if
(
dwFlags
&
DIEP_NORESTART
)
TRACE
(
"DIEP_NORESTART: not handled (we have no control of that).
\n
"
);
...
...
@@ -744,7 +744,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
event
.
code
=
This
->
effect
.
id
;
event
.
value
=
0
;
/* we don't care about the success or failure of this call */
write
(
This
->
fd
,
&
event
,
sizeof
(
event
));
write
(
*
(
This
->
fd
)
,
&
event
,
sizeof
(
event
));
return
DI_OK
;
}
...
...
@@ -756,7 +756,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Unload(
TRACE
(
"(this=%p)
\n
"
,
This
);
/* Erase the downloaded effect */
if
(
ioctl
(
This
->
fd
,
EVIOCRMFF
,
This
->
effect
.
id
)
==
-
1
)
if
(
ioctl
(
*
(
This
->
fd
)
,
EVIOCRMFF
,
This
->
effect
.
id
)
==
-
1
)
return
DIERR_INVALIDPARAM
;
/* Mark the effect as deallocated */
...
...
@@ -770,7 +770,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Unload(
*/
HRESULT
linuxinput_create_effect
(
int
fd
,
int
*
fd
,
REFGUID
rguid
,
LPDIRECTINPUTEFFECT
*
peff
)
{
...
...
dlls/dinput/joystick_linuxinput.c
View file @
feb9ab68
...
...
@@ -77,7 +77,7 @@ struct EffectListItem
};
/* implemented in effect_linuxinput.c */
HRESULT
linuxinput_create_effect
(
int
fd
,
REFGUID
rguid
,
LPDIRECTINPUTEFFECT
*
peff
);
HRESULT
linuxinput_create_effect
(
int
*
fd
,
REFGUID
rguid
,
LPDIRECTINPUTEFFECT
*
peff
);
HRESULT
linuxinput_get_info_A
(
int
fd
,
REFGUID
rguid
,
LPDIEFFECTINFOA
info
);
HRESULT
linuxinput_get_info_W
(
int
fd
,
REFGUID
rguid
,
LPDIEFFECTINFOW
info
);
...
...
@@ -1171,13 +1171,13 @@ static HRESULT WINAPI JoystickAImpl_CreateEffect(LPDIRECTINPUTDEVICE8A iface,
new
->
next
=
This
->
top_effect
;
This
->
top_effect
=
new
;
retval
=
linuxinput_create_effect
(
This
->
joyfd
,
rguid
,
&
(
new
->
ref
));
retval
=
linuxinput_create_effect
(
&
(
This
->
joyfd
)
,
rguid
,
&
(
new
->
ref
));
if
(
retval
!=
DI_OK
)
return
retval
;
if
(
lpeff
!=
NULL
)
retval
=
new
->
ref
->
lpVtbl
->
SetParameters
(
new
->
ref
,
lpeff
,
0
);
if
(
retval
!=
DI_OK
)
if
(
retval
!=
DI_OK
&&
retval
!=
DI_DOWNLOADSKIPPED
)
return
retval
;
*
ppdef
=
new
->
ref
;
...
...
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