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
44143a97
Commit
44143a97
authored
Apr 10, 2008
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
Apr 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Temporarily activate viewport when clearing.
parent
3e237c61
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
viewport.c
dlls/ddraw/viewport.c
+24
-0
No files found.
dlls/ddraw/viewport.c
View file @
44143a97
...
...
@@ -667,6 +667,7 @@ IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
ICOM_THIS_FROM
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
iface
);
DWORD
color
=
0x00000000
;
HRESULT
hr
;
LPDIRECT3DVIEWPORT3
current_viewport
;
TRACE
(
"(%p/%p)->(%08x,%p,%08x)
\n
"
,
This
,
iface
,
dwCount
,
lpRects
,
dwFlags
);
if
(
This
->
active_device
==
NULL
)
{
...
...
@@ -687,6 +688,10 @@ IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
}
}
/* Need to temporarily activate viewport to clear it. Previously active one will be restored
afterwards. */
This
->
activate
(
This
,
TRUE
);
hr
=
IDirect3DDevice7_Clear
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice7
),
dwCount
,
lpRects
,
...
...
@@ -694,6 +699,14 @@ IDirect3DViewportImpl_Clear(IDirect3DViewport3 *iface,
color
,
1
.
0
,
0x00000000
);
IDirect3DDevice3_GetCurrentViewport
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice3
),
&
current_viewport
);
if
(
current_viewport
)
{
IDirect3DViewportImpl
*
vp
=
ICOM_OBJECT
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
current_viewport
);
vp
->
activate
(
vp
,
TRUE
);
IDirect3DViewport3_Release
(
current_viewport
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
@@ -989,6 +1002,7 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
{
ICOM_THIS_FROM
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
iface
);
HRESULT
hr
;
LPDIRECT3DVIEWPORT3
current_viewport
;
TRACE
(
"(%p)->(%08x,%p,%08x,%08x,%f,%08x)
\n
"
,
This
,
dwCount
,
lpRects
,
dwFlags
,
dwColor
,
dvZ
,
dwStencil
);
EnterCriticalSection
(
&
ddraw_cs
);
...
...
@@ -997,6 +1011,10 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3DERR_VIEWPORTHASNODEVICE
;
}
/* Need to temporarily activate viewport to clear it. Previously active one will be restored
afterwards. */
This
->
activate
(
This
,
TRUE
);
hr
=
IDirect3DDevice7_Clear
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice7
),
dwCount
,
lpRects
,
...
...
@@ -1004,6 +1022,12 @@ IDirect3DViewportImpl_Clear2(IDirect3DViewport3 *iface,
dwColor
,
dvZ
,
dwStencil
);
IDirect3DDevice3_GetCurrentViewport
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice3
),
&
current_viewport
);
if
(
current_viewport
)
{
IDirect3DViewportImpl
*
vp
=
ICOM_OBJECT
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
current_viewport
);
vp
->
activate
(
vp
,
TRUE
);
IDirect3DViewport3_Release
(
current_viewport
);
}
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
}
...
...
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