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
0adc4708
Commit
0adc4708
authored
Jan 03, 2011
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: COM cleanup - use interface instead of lpvtbl in joystick effects.
parent
64c1b792
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
effect_linuxinput.c
dlls/dinput/effect_linuxinput.c
+16
-12
No files found.
dlls/dinput/effect_linuxinput.c
View file @
0adc4708
...
@@ -49,7 +49,7 @@ static const IDirectInputEffectVtbl LinuxInputEffectVtbl;
...
@@ -49,7 +49,7 @@ static const IDirectInputEffectVtbl LinuxInputEffectVtbl;
typedef
struct
LinuxInputEffectImpl
LinuxInputEffectImpl
;
typedef
struct
LinuxInputEffectImpl
LinuxInputEffectImpl
;
struct
LinuxInputEffectImpl
struct
LinuxInputEffectImpl
{
{
const
void
*
lpVtbl
;
IDirectInputEffect
IDirectInputEffect_iface
;
LONG
ref
;
LONG
ref
;
GUID
guid
;
GUID
guid
;
...
@@ -60,6 +60,10 @@ struct LinuxInputEffectImpl
...
@@ -60,6 +60,10 @@ struct LinuxInputEffectImpl
struct
list
*
entry
;
/* Entry into the parent's list of effects */
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
* DirectInputEffect Functional Helper
...
@@ -244,14 +248,14 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
...
@@ -244,14 +248,14 @@ static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid)
static
ULONG
WINAPI
LinuxInputEffectImpl_AddRef
(
static
ULONG
WINAPI
LinuxInputEffectImpl_AddRef
(
LPDIRECTINPUTEFFECT
iface
)
LPDIRECTINPUTEFFECT
iface
)
{
{
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
}
static
HRESULT
WINAPI
LinuxInputEffectImpl_Download
(
static
HRESULT
WINAPI
LinuxInputEffectImpl_Download
(
LPDIRECTINPUTEFFECT
iface
)
LPDIRECTINPUTEFFECT
iface
)
{
{
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
TRACE
(
"(this=%p)
\n
"
,
This
);
TRACE
(
"(this=%p)
\n
"
,
This
);
...
@@ -281,7 +285,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetEffectGuid(
...
@@ -281,7 +285,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetEffectGuid(
LPDIRECTINPUTEFFECT
iface
,
LPDIRECTINPUTEFFECT
iface
,
LPGUID
pguid
)
LPGUID
pguid
)
{
{
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
pguid
);
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
pguid
);
...
@@ -312,7 +316,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
...
@@ -312,7 +316,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_GetParameters(
DWORD
dwFlags
)
DWORD
dwFlags
)
{
{
HRESULT
diErr
=
DI_OK
;
HRESULT
diErr
=
DI_OK
;
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
TRACE
(
"(this=%p,%p,%d)
\n
"
,
This
,
peff
,
dwFlags
);
TRACE
(
"(this=%p,%p,%d)
\n
"
,
This
,
peff
,
dwFlags
);
/* Major conversion factors are:
/* Major conversion factors are:
...
@@ -474,7 +478,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_QueryInterface(
...
@@ -474,7 +478,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_QueryInterface(
REFIID
riid
,
REFIID
riid
,
void
**
ppvObject
)
void
**
ppvObject
)
{
{
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
TRACE
(
"(this=%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
TRACE
(
"(this=%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
...
@@ -495,7 +499,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
...
@@ -495,7 +499,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Start(
DWORD
dwFlags
)
DWORD
dwFlags
)
{
{
struct
input_event
event
;
struct
input_event
event
;
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
TRACE
(
"(this=%p,%d,%d)
\n
"
,
This
,
dwIterations
,
dwFlags
);
TRACE
(
"(this=%p,%d,%d)
\n
"
,
This
,
dwIterations
,
dwFlags
);
...
@@ -528,7 +532,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
...
@@ -528,7 +532,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters(
LPCDIEFFECT
peff
,
LPCDIEFFECT
peff
,
DWORD
dwFlags
)
DWORD
dwFlags
)
{
{
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
);
DWORD
type
=
_typeFromGUID
(
&
This
->
guid
);
DWORD
type
=
_typeFromGUID
(
&
This
->
guid
);
HRESULT
retval
=
DI_OK
;
HRESULT
retval
=
DI_OK
;
...
@@ -727,7 +731,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
...
@@ -727,7 +731,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
LPDIRECTINPUTEFFECT
iface
)
LPDIRECTINPUTEFFECT
iface
)
{
{
struct
input_event
event
;
struct
input_event
event
;
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
TRACE
(
"(this=%p)
\n
"
,
This
);
TRACE
(
"(this=%p)
\n
"
,
This
);
...
@@ -743,7 +747,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
...
@@ -743,7 +747,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Stop(
static
HRESULT
WINAPI
LinuxInputEffectImpl_Unload
(
static
HRESULT
WINAPI
LinuxInputEffectImpl_Unload
(
LPDIRECTINPUTEFFECT
iface
)
LPDIRECTINPUTEFFECT
iface
)
{
{
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
TRACE
(
"(this=%p)
\n
"
,
This
);
TRACE
(
"(this=%p)
\n
"
,
This
);
/* Erase the downloaded effect */
/* Erase the downloaded effect */
...
@@ -758,7 +762,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Unload(
...
@@ -758,7 +762,7 @@ static HRESULT WINAPI LinuxInputEffectImpl_Unload(
static
ULONG
WINAPI
LinuxInputEffectImpl_Release
(
LPDIRECTINPUTEFFECT
iface
)
static
ULONG
WINAPI
LinuxInputEffectImpl_Release
(
LPDIRECTINPUTEFFECT
iface
)
{
{
LinuxInputEffectImpl
*
This
=
(
LinuxInputEffectImpl
*
)
iface
;
LinuxInputEffectImpl
*
This
=
impl_from_IDirectInputEffect
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
(
This
->
ref
));
ULONG
ref
=
InterlockedDecrement
(
&
(
This
->
ref
));
if
(
ref
==
0
)
if
(
ref
==
0
)
...
@@ -786,7 +790,7 @@ HRESULT linuxinput_create_effect(
...
@@ -786,7 +790,7 @@ HRESULT linuxinput_create_effect(
HEAP_ZERO_MEMORY
,
sizeof
(
LinuxInputEffectImpl
));
HEAP_ZERO_MEMORY
,
sizeof
(
LinuxInputEffectImpl
));
DWORD
type
=
_typeFromGUID
(
rguid
);
DWORD
type
=
_typeFromGUID
(
rguid
);
newEffect
->
lpVtbl
=
&
LinuxInputEffectVtbl
;
newEffect
->
IDirectInputEffect_iface
.
lpVtbl
=
&
LinuxInputEffectVtbl
;
newEffect
->
ref
=
1
;
newEffect
->
ref
=
1
;
newEffect
->
guid
=
*
rguid
;
newEffect
->
guid
=
*
rguid
;
newEffect
->
fd
=
fd
;
newEffect
->
fd
=
fd
;
...
...
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