Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4b84c5e5
Commit
4b84c5e5
authored
Aug 18, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Add a separate function for clipper initialization.
parent
759fd517
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
clipper.c
dlls/ddraw/clipper.c
+15
-1
ddraw.c
dlls/ddraw/ddraw.c
+7
-5
ddraw_private.h
dlls/ddraw/ddraw_private.h
+1
-1
No files found.
dlls/ddraw/clipper.c
View file @
4b84c5e5
...
...
@@ -283,7 +283,7 @@ static HRESULT WINAPI IDirectDrawClipperImpl_IsClipListChanged(
/*****************************************************************************
* The VTable
*****************************************************************************/
const
IDirectDrawClipperVtbl
IDirectDrawClipper_V
tbl
=
static
const
struct
IDirectDrawClipperVtbl
ddraw_clipper_v
tbl
=
{
IDirectDrawClipperImpl_QueryInterface
,
IDirectDrawClipperImpl_AddRef
,
...
...
@@ -295,3 +295,17 @@ const IDirectDrawClipperVtbl IDirectDrawClipper_Vtbl =
IDirectDrawClipperImpl_SetClipList
,
IDirectDrawClipperImpl_SetHwnd
};
HRESULT
ddraw_clipper_init
(
IDirectDrawClipperImpl
*
clipper
)
{
clipper
->
lpVtbl
=
&
ddraw_clipper_vtbl
;
clipper
->
ref
=
1
;
clipper
->
wineD3DClipper
=
pWineDirect3DCreateClipper
((
IUnknown
*
)
clipper
);
if
(
!
clipper
->
wineD3DClipper
)
{
WARN
(
"Failed to create wined3d clipper.
\n
"
);
return
E_OUTOFMEMORY
;
}
return
DD_OK
;
}
dlls/ddraw/ddraw.c
View file @
4b84c5e5
...
...
@@ -3840,6 +3840,8 @@ DirectDrawCreateClipper(DWORD Flags,
IUnknown
*
UnkOuter
)
{
IDirectDrawClipperImpl
*
object
;
HRESULT
hr
;
TRACE
(
"(%08x,%p,%p)
\n
"
,
Flags
,
Clipper
,
UnkOuter
);
EnterCriticalSection
(
&
ddraw_cs
);
...
...
@@ -3863,16 +3865,16 @@ DirectDrawCreateClipper(DWORD Flags,
return
E_OUTOFMEMORY
;
}
object
->
lpVtbl
=
&
IDirectDrawClipper_Vtbl
;
object
->
ref
=
1
;
object
->
wineD3DClipper
=
pWineDirect3DCreateClipper
((
IUnknown
*
)
object
);
if
(
!
object
->
wineD3DClipper
)
hr
=
ddraw_clipper_init
(
object
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize clipper, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
E_OUTOFMEMORY
;
return
hr
;
}
TRACE
(
"Created clipper %p.
\n
"
,
object
);
*
Clipper
=
(
IDirectDrawClipper
*
)
object
;
LeaveCriticalSection
(
&
ddraw_cs
);
return
DD_OK
;
...
...
dlls/ddraw/ddraw_private.h
View file @
4b84c5e5
...
...
@@ -462,7 +462,7 @@ struct IDirectDrawClipperImpl
BOOL
initialized
;
};
extern
const
IDirectDrawClipperVtbl
IDirectDrawClipper_Vtbl
DECLSPEC_HIDDEN
;
HRESULT
ddraw_clipper_init
(
IDirectDrawClipperImpl
*
clipper
)
DECLSPEC_HIDDEN
;
typeof
(
WineDirect3DCreateClipper
)
*
pWineDirect3DCreateClipper
DECLSPEC_HIDDEN
;
...
...
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