Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
0adc4708
Commit
0adc4708
authored
14 years ago
by
Vitaliy Margolen
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
dinput: COM cleanup - use interface instead of lpvtbl in joystick effects.
parent
64c1b792
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/dinput/effect_linuxinput.c
+19
-15
19 additions, 15 deletions
dlls/dinput/effect_linuxinput.c
with
19 additions
and
15 deletions
dlls/dinput/effect_linuxinput.c
+
19
−
15
View file @
0adc4708
...
...
@@ -49,9 +49,9 @@ static const IDirectInputEffectVtbl LinuxInputEffectVtbl;
typedef
struct
LinuxInputEffectImpl
LinuxInputEffectImpl
;
struct
LinuxInputEffectImpl
{
const
void
*
lpVtbl
;
LONG
ref
;
GUID
guid
;
IDirectInputEffect
IDirectInputEffect_iface
;
LONG
ref
;
GUID
guid
;
struct
ff_effect
effect
;
/* Effect data */
int
gain
;
/* Effect gain */
...
...
@@ -60,6 +60,10 @@ struct LinuxInputEffectImpl
struct
list
*
entry
;
/* Entry into the parent's list of effects */
};
static
inline
LinuxInputEffectImpl
*
impl_from_IDirectInputEffect
(
IDirectInputEffect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
LinuxInputEffectImpl
,
IDirectInputEffect_iface
);
}
/******************************************************************************
* DirectInputEffect Functional Helper
...
...
@@ -244,14 +248,14 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
static
ULONG
WINAPI
LinuxInputEffectImpl_AddRef
(
LPDIRECTINPUTEFFECT
iface
)
{
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
static
HRESULT
WINAPI
LinuxInputEffectImpl_Download
(
LPDIRECTINPUTEFFECT
iface
)
{
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
TRACE
(
"(this=%p)
\n
"
,
This
);
...
...
@@ -281,7 +285,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetEffectGuid(
LPDIRECTINPUTEFFECT
iface
,
LPGUID
pguid
)
{
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
pguid
);
...
...
@@ -312,7 +316,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
DWORD
dwFlags
)
{
HRESULT
diErr
=
DI_OK
;
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
TRACE
(
"(this=%p,%p,%d)
\n
"
,
This
,
peff
,
dwFlags
);
/* Major conversion factors are:
...
...
@@ -474,7 +478,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_QueryInterface(
REFIID
riid
,
void
**
ppvObject
)
{
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
TRACE
(
"(this=%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
...
...
@@ -495,7 +499,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
DWORD
dwFlags
)
{
struct
input_event
event
;
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
TRACE
(
"(this=%p,%d,%d)
\n
"
,
This
,
dwIterations
,
dwFlags
);
...
...
@@ -527,8 +531,8 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
LPDIRECTINPUTEFFECT
iface
,
LPCDIEFFECT
peff
,
DWORD
dwFlags
)
{
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
{
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
DWORD
type
=
_typeFromGUID
(
&
This
->
guid
);
HRESULT
retval
=
DI_OK
;
...
...
@@ -727,7 +731,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
LPDIRECTINPUTEFFECT
iface
)
{
struct
input_event
event
;
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
TRACE
(
"(this=%p)
\n
"
,
This
);
...
...
@@ -743,7 +747,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
static
HRESULT
WINAPI
LinuxInputEffectImpl_Unload
(
LPDIRECTINPUTEFFECT
iface
)
{
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
TRACE
(
"(this=%p)
\n
"
,
This
);
/* Erase the downloaded effect */
...
...
@@ -758,7 +762,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Unload(
static
ULONG
WINAPI
LinuxInputEffectImpl_Release
(
LPDIRECTINPUTEFFECT
iface
)
{
LinuxInputEffectImpl
*
This
=
(
Linux
InputEffect
Impl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirect
InputEffect
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
(
This
->
ref
));
if
(
ref
==
0
)
...
...
@@ -786,7 +790,7 @@ HRESULT linuxinput_create_effect(
HEAP_ZERO_MEMORY
,
sizeof
(
LinuxInputEffectImpl
));
DWORD
type
=
_typeFromGUID
(
rguid
);
newEffect
->
lpVtbl
=
&
LinuxInputEffectVtbl
;
newEffect
->
IDirectInputEffect_iface
.
lpVtbl
=
&
LinuxInputEffectVtbl
;
newEffect
->
ref
=
1
;
newEffect
->
guid
=
*
rguid
;
newEffect
->
fd
=
fd
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment