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
f85759bc
Commit
f85759bc
authored
Jan 13, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jan 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the 'DIRECTDRAW7' flag according to the interface initialized.
parent
18e6bb81
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
24 deletions
+57
-24
hal.c
dlls/ddraw/ddraw/hal.c
+1
-1
thunks.c
dlls/ddraw/ddraw/thunks.c
+31
-15
main.c
dlls/ddraw/main.c
+25
-8
No files found.
dlls/ddraw/ddraw/hal.c
View file @
f85759bc
...
...
@@ -335,7 +335,7 @@ HRESULT HAL_DirectDraw_Construct(IDirectDrawImpl *This, BOOL ex)
{
HRESULT
hr
;
TRACE
(
"(%p
)
\n
"
,
This
);
TRACE
(
"(%p
,%d)
\n
"
,
This
,
ex
);
hr
=
User_DirectDraw_Construct
(
This
,
ex
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
dlls/ddraw/ddraw/thunks.c
View file @
f85759bc
...
...
@@ -698,32 +698,48 @@ IDirectDraw4Impl_GetVerticalBlankStatus(LPDIRECTDRAW4 This, LPBOOL lpbIsInVB)
}
static
HRESULT
WINAPI
IDirectDrawImpl_Initialize
(
LPDIRECTDRAW
This
,
LPGUID
pGUID
)
IDirectDrawImpl_Initialize
(
LPDIRECTDRAW
iface
,
LPGUID
pGUID
)
{
return
IDirectDraw7_Initialize
(
COM_INTERFACE_CAST
(
IDirectDrawImpl
,
IDirectDraw
,
IDirectDraw7
,
This
),
pGUID
);
ICOM_THIS_FROM
(
IDirectDrawImpl
,
IDirectDraw
,
iface
);
HRESULT
ret_value
;
ret_value
=
IDirectDraw7_Initialize
(
ICOM_INTERFACE
(
This
,
IDirectDraw7
),
pGUID
);
/* Overwrite the falsely set 'DIRECTDRAW7' flag */
This
->
local
.
dwLocalFlags
&=
~
DDRAWILCL_DIRECTDRAW7
;
return
ret_value
;
}
static
HRESULT
WINAPI
IDirectDraw2Impl_Initialize
(
LPDIRECTDRAW2
This
,
LPGUID
pGUID
)
IDirectDraw2Impl_Initialize
(
LPDIRECTDRAW2
iface
,
LPGUID
pGUID
)
{
return
IDirectDraw7_Initialize
(
COM_INTERFACE_CAST
(
IDirectDrawImpl
,
IDirectDraw2
,
IDirectDraw7
,
This
),
pGUID
);
ICOM_THIS_FROM
(
IDirectDrawImpl
,
IDirectDraw2
,
iface
);
HRESULT
ret_value
;
ret_value
=
IDirectDraw7_Initialize
(
ICOM_INTERFACE
(
This
,
IDirectDraw7
),
pGUID
);
/* Overwrite the falsely set 'DIRECTDRAW7' flag */
This
->
local
.
dwLocalFlags
&=
~
DDRAWILCL_DIRECTDRAW7
;
return
ret_value
;
}
static
HRESULT
WINAPI
IDirectDraw4Impl_Initialize
(
LPDIRECTDRAW4
This
,
LPGUID
pGUID
)
IDirectDraw4Impl_Initialize
(
LPDIRECTDRAW4
iface
,
LPGUID
pGUID
)
{
return
IDirectDraw7_Initialize
(
COM_INTERFACE_CAST
(
IDirectDrawImpl
,
IDirectDraw4
,
IDirectDraw7
,
This
),
pGUID
);
ICOM_THIS_FROM
(
IDirectDrawImpl
,
IDirectDraw4
,
iface
);
HRESULT
ret_value
;
ret_value
=
IDirectDraw7_Initialize
(
ICOM_INTERFACE
(
This
,
IDirectDraw7
),
pGUID
);
/* Overwrite the falsely set 'DIRECTDRAW7' flag */
This
->
local
.
dwLocalFlags
&=
~
DDRAWILCL_DIRECTDRAW7
;
return
ret_value
;
}
static
HRESULT
WINAPI
IDirectDrawImpl_RestoreDisplayMode
(
LPDIRECTDRAW
This
)
{
...
...
dlls/ddraw/main.c
View file @
f85759bc
...
...
@@ -241,6 +241,8 @@ static HRESULT DDRAW_Create(
LPDIRECTDRAW7
pDD
;
HRESULT
hr
;
TRACE
(
"(%s,%p,%p,%d)
\n
"
,
debugstr_guid
(
lpGUID
),
lplpDD
,
pUnkOuter
,
ex
);
if
(
DDRAW_num_drivers
==
0
)
{
WARN
(
"no DirectDraw drivers registered
\n
"
);
...
...
@@ -251,8 +253,6 @@ static HRESULT DDRAW_Create(
||
lpGUID
==
(
LPGUID
)
DDCREATE_HARDWAREONLY
)
lpGUID
=
NULL
;
TRACE
(
"(%s,%p,%p)
\n
"
,
debugstr_guid
(
lpGUID
),
lplpDD
,
pUnkOuter
);
if
(
pUnkOuter
!=
NULL
)
return
DDERR_INVALIDPARAMS
;
/* CLASS_E_NOAGGREGATION? */
...
...
@@ -277,7 +277,8 @@ static HRESULT DDRAW_Create(
HRESULT
WINAPI
DirectDrawCreate
(
LPGUID
lpGUID
,
LPDIRECTDRAW
*
lplpDD
,
LPUNKNOWN
pUnkOuter
)
{
return
DDRAW_Create
(
lpGUID
,(
LPVOID
*
)
lplpDD
,
pUnkOuter
,
&
IID_IDirectDraw
,
FALSE
);
TRACE
(
"(%s,%p,%p)
\n
"
,
debugstr_guid
(
lpGUID
),
lplpDD
,
pUnkOuter
);
return
DDRAW_Create
(
lpGUID
,
(
LPVOID
*
)
lplpDD
,
pUnkOuter
,
&
IID_IDirectDraw
,
FALSE
);
}
/***********************************************************************
...
...
@@ -290,10 +291,12 @@ HRESULT WINAPI DirectDrawCreate(
HRESULT
WINAPI
DirectDrawCreateEx
(
LPGUID
lpGUID
,
LPVOID
*
lplpDD
,
REFIID
iid
,
LPUNKNOWN
pUnkOuter
)
{
TRACE
(
"(%s,%p,%s,%p)
\n
"
,
debugstr_guid
(
lpGUID
),
lplpDD
,
debugstr_guid
(
iid
),
pUnkOuter
);
if
(
!
IsEqualGUID
(
iid
,
&
IID_IDirectDraw7
))
return
DDERR_INVALIDPARAMS
;
return
DDRAW_Create
(
lpGUID
,
lplpDD
,
pUnkOuter
,
iid
,
TRUE
);
return
DDRAW_Create
(
lpGUID
,
lplpDD
,
pUnkOuter
,
iid
,
TRUE
);
}
extern
HRESULT
Uninit_DirectDraw_Create
(
const
GUID
*
,
LPDIRECTDRAW7
*
,
...
...
@@ -305,8 +308,17 @@ static HRESULT DDRAW_CreateDirectDraw(IUnknown* pUnkOuter, REFIID iid,
{
LPDIRECTDRAW7
pDD
;
HRESULT
hr
;
BOOL
ex
;
hr
=
Uninit_DirectDraw_Create
(
NULL
,
&
pDD
,
pUnkOuter
,
TRUE
);
/* ex? */
TRACE
(
"(%p,%s,%p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
iid
),
ppObj
);
/* This is a mighty hack :-) */
if
(
IsEqualGUID
(
iid
,
&
IID_IDirectDraw7
))
ex
=
TRUE
;
else
ex
=
FALSE
;
hr
=
Uninit_DirectDraw_Create
(
NULL
,
&
pDD
,
pUnkOuter
,
ex
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IDirectDraw7_QueryInterface
(
pDD
,
iid
,
ppObj
);
...
...
@@ -349,6 +361,8 @@ DDCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
{
ICOM_THIS
(
IClassFactoryImpl
,
iface
);
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IClassFactory
))
{
...
...
@@ -363,18 +377,21 @@ DDCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj)
static
ULONG
WINAPI
DDCF_AddRef
(
LPCLASSFACTORY
iface
)
{
ICOM_THIS
(
IClassFactoryImpl
,
iface
);
TRACE
(
"(%p)->() incrementing from %ld.
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
}
static
ULONG
WINAPI
DDCF_Release
(
LPCLASSFACTORY
iface
)
{
ICOM_THIS
(
IClassFactoryImpl
,
iface
);
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p)->() decrementing from %ld.
\n
"
,
This
,
This
->
ref
)
;
if
(
ref
==
0
)
if
(
--
This
->
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
return
This
->
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