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
951f4657
Commit
951f4657
authored
Jul 20, 2006
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Jul 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput8: DirectInput8Create rewrite.
parent
31e3ad71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
5 deletions
+39
-5
Makefile.in
dlls/dinput8/Makefile.in
+1
-1
dinput8_main.c
dlls/dinput8/dinput8_main.c
+35
-4
wine.inf
tools/wine.inf
+3
-0
No files found.
dlls/dinput8/Makefile.in
View file @
951f4657
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
dinput8.dll
IMPORTLIB
=
libdinput8.
$(IMPLIBEXT)
IMPORTS
=
dinput kernel32
IMPORTS
=
dinput
ole32 advapi32
kernel32
EXTRALIBS
=
-luuid
-ldxguid
C_SRCS
=
\
...
...
dlls/dinput8/dinput8_main.c
View file @
951f4657
...
...
@@ -51,8 +51,39 @@ static void UnlockModule(void)
* DirectInput8Create (DINPUT8.@)
*/
HRESULT
WINAPI
DirectInput8Create
(
HINSTANCE
hinst
,
DWORD
dwVersion
,
REFIID
riid
,
LPVOID
*
ppDI
,
LPUNKNOWN
punkOuter
)
{
/* TODO: Create the interface using CoCreateInstance as that's what windows does too and check if the version number >= 0x800 */
return
DirectInputCreateEx
(
hinst
,
dwVersion
,
riid
,
ppDI
,
punkOuter
);
HRESULT
hr
;
TRACE
(
"hInst (%p), dwVersion: %ld, riid (%s), punkOuter (%p))
\n
"
,
hinst
,
dwVersion
,
debugstr_guid
(
riid
),
punkOuter
);
/* The specified version needs to be dinput8 (0x800) or higher */
if
(
dwVersion
<
0x800
)
return
DIERR_OLDDIRECTINPUTVERSION
;
if
(
!
(
IsEqualGUID
(
&
IID_IDirectInput8A
,
riid
)
||
IsEqualGUID
(
&
IID_IDirectInput8W
,
riid
)
||
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
)
return
DIERR_INVALIDPARAM
;
CoInitialize
(
NULL
);
hr
=
CoCreateInstance
(
&
CLSID_DirectInput8
,
punkOuter
,
CLSCTX_INPROC_SERVER
,
riid
,
ppDI
);
if
(
FAILED
(
hr
))
{
ERR
(
"CoCreateInstance failed with hr = %ld
\n
"
,
hr
);
return
DIERR_INVALIDPARAM
;
}
CoUninitialize
();
/* When aggregation is used (punkOuter!=NULL) the application needs to manually call Initialize. */
if
(
punkOuter
==
NULL
&&
IsEqualGUID
(
&
IID_IDirectInput8A
,
riid
))
{
LPDIRECTINPUTA
DI
=
(
LPDIRECTINPUTA
)
*
ppDI
;
IDirectInput8_Initialize
(
DI
,
hinst
,
dwVersion
);
}
if
(
punkOuter
==
NULL
&&
IsEqualGUID
(
&
IID_IDirectInput8W
,
riid
))
{
LPDIRECTINPUTW
DI
=
(
LPDIRECTINPUTW
)
*
ppDI
;
IDirectInput8_Initialize
(
DI
,
hinst
,
dwVersion
);
}
return
S_OK
;
}
/*******************************************************************************
...
...
@@ -84,8 +115,8 @@ static HRESULT WINAPI DI8CF_CreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p)->(%p,%s,%p)
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
&
IID_IDirectInput8A
,
riid
)
||
IsEqualGUID
(
&
IID_IDirectInput8W
,
riid
)
)
{
return
DirectInput
8Create
(
0
,
DIRECTINPUT_VERSION
,
riid
,
ppobj
,
pOuter
);
if
(
IsEqualGUID
(
&
IID_IDirectInput8A
,
riid
)
||
IsEqualGUID
(
&
IID_IDirectInput8W
,
riid
)
||
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
)
{
return
DirectInput
CreateEx
(
0
,
DIRECTINPUT_VERSION
,
riid
,
ppobj
,
pOuter
);
}
ERR
(
"(%p,%p,%s,%p) Interface not found!
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
...
...
tools/wine.inf
View file @
951f4657
...
...
@@ -126,6 +126,9 @@ HKCR,AVIFile\Extensions\AVI,,,"{00020000-0000-0000-C000-000000000046}"
HKCR,AVIFile\Extensions\WAV,,,"{00020003-0000-0000-C000-000000000046}"
HKCR,AVIFile\RIFFHandlers\AVI,,,"{00020000-0000-0000-C000-000000000046}"
HKCR,AVIFile\RIFFHandlers\WAVE,,,"{00020003-0000-0000-C000-000000000046}"
HKCR,CLSID\{25E609E4-B259-11CF-BFC7-444553540000},,,"DirectInput8 Object"
HKCR,CLSID\{25E609E4-B259-11CF-BFC7-444553540000}\InProcServer32,,,"dinput8.dll"
HKCR,CLSID\{25E609E4-B259-11CF-BFC7-444553540000}\InProcServer32,ThreadingModel,,"Both"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0,,,"OLE Automation"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\0\win16,,,"stdole.tlb"
HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\0\win32,,,"stdole32.tlb"
...
...
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