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
92ac7861
Commit
92ac7861
authored
Jan 18, 2011
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Combine ASCII and Unicode Direct Input Device QueryInterface.
parent
9441d898
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
63 deletions
+26
-63
device.c
dlls/dinput/device.c
+26
-63
No files found.
dlls/dinput/device.c
View file @
92ac7861
...
@@ -774,76 +774,39 @@ ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface)
...
@@ -774,76 +774,39 @@ ULONG WINAPI IDirectInputDevice2AImpl_Release(LPDIRECTINPUTDEVICE8A iface)
return
IDirectInputDevice2WImpl_Release
(
IDirectInputDevice8W_from_impl
(
This
));
return
IDirectInputDevice2WImpl_Release
(
IDirectInputDevice8W_from_impl
(
This
));
}
}
HRESULT
WINAPI
IDirectInputDevice2AImpl_QueryInterface
(
HRESULT
WINAPI
IDirectInputDevice2WImpl_QueryInterface
(
LPDIRECTINPUTDEVICE8W
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
LPDIRECTINPUTDEVICE8A
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
IDirectInputDeviceImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
IDirectInputDeviceImpl
*
This
=
impl_from_IDirectInputDevice8W
(
iface
);
TRACE
(
"(this=%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
TRACE
(
"(%p this=%p,%s,%p)
\n
"
,
iface
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IDirectInputDevice2_AddRef
(
iface
);
IsEqualGUID
(
&
IID_IDirectInputDeviceA
,
riid
)
||
*
ppobj
=
This
;
IsEqualGUID
(
&
IID_IDirectInputDevice2A
,
riid
)
||
return
DI_OK
;
IsEqualGUID
(
&
IID_IDirectInputDevice7A
,
riid
)
||
}
IsEqualGUID
(
&
IID_IDirectInputDevice8A
,
riid
))
if
(
IsEqualGUID
(
&
IID_IDirectInputDeviceA
,
riid
))
{
{
IDirectInputDevice2_AddRef
(
iface
);
IDirectInputDevice2_AddRef
(
iface
);
*
ppobj
=
This
;
*
ppobj
=
IDirectInputDevice8A_from_impl
(
This
);
return
DI_OK
;
return
DI_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectInputDevice2A
,
riid
))
{
IDirectInputDevice2_AddRef
(
iface
);
*
ppobj
=
This
;
return
DI_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectInputDevice7A
,
riid
))
{
IDirectInputDevice7_AddRef
(
iface
);
*
ppobj
=
This
;
return
DI_OK
;
}
}
if
(
IsEqualGUID
(
&
IID_IDirectInputDevice8A
,
riid
))
{
if
(
IsEqualGUID
(
&
IID_IDirectInputDeviceW
,
riid
)
||
IDirectInputDevice8_AddRef
(
iface
);
IsEqualGUID
(
&
IID_IDirectInputDevice2W
,
riid
)
||
*
ppobj
=
This
;
IsEqualGUID
(
&
IID_IDirectInputDevice7W
,
riid
)
||
return
DI_OK
;
IsEqualGUID
(
&
IID_IDirectInputDevice8W
,
riid
))
{
IDirectInputDevice2_AddRef
(
iface
);
*
ppobj
=
IDirectInputDevice8W_from_impl
(
This
);
return
DI_OK
;
}
}
TRACE
(
"Unsupported interface !
\n
"
);
WARN
(
"Unsupported interface!
\n
"
);
return
E_FAIL
;
return
E_FAIL
;
}
}
HRESULT
WINAPI
IDirectInputDevice2WImpl_QueryInterface
(
HRESULT
WINAPI
IDirectInputDevice2AImpl_QueryInterface
(
LPDIRECTINPUTDEVICE8A
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
LPDIRECTINPUTDEVICE8W
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
IDirectInputDeviceImpl
*
This
=
impl_from_IDirectInputDevice8W
(
iface
);
IDirectInputDeviceImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
return
IDirectInputDevice2WImpl_QueryInterface
(
IDirectInputDevice8W_from_impl
(
This
),
riid
,
ppobj
);
TRACE
(
"(this=%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
IDirectInputDevice2_AddRef
(
iface
);
*
ppobj
=
This
;
return
DI_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectInputDeviceW
,
riid
))
{
IDirectInputDevice2_AddRef
(
iface
);
*
ppobj
=
This
;
return
DI_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectInputDevice2W
,
riid
))
{
IDirectInputDevice2_AddRef
(
iface
);
*
ppobj
=
This
;
return
DI_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectInputDevice7W
,
riid
))
{
IDirectInputDevice7_AddRef
(
iface
);
*
ppobj
=
This
;
return
DI_OK
;
}
if
(
IsEqualGUID
(
&
IID_IDirectInputDevice8W
,
riid
))
{
IDirectInputDevice8_AddRef
(
iface
);
*
ppobj
=
This
;
return
DI_OK
;
}
TRACE
(
"Unsupported interface !
\n
"
);
return
E_FAIL
;
}
}
ULONG
WINAPI
IDirectInputDevice2WImpl_AddRef
(
LPDIRECTINPUTDEVICE8W
iface
)
ULONG
WINAPI
IDirectInputDevice2WImpl_AddRef
(
LPDIRECTINPUTDEVICE8W
iface
)
...
...
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