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
3e237c61
Commit
3e237c61
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: Set active_device in AddViewport.
parent
6a48e405
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
device.c
dlls/ddraw/device.c
+2
-0
viewport.c
dlls/ddraw/viewport.c
+12
-8
No files found.
dlls/ddraw/device.c
View file @
3e237c61
...
...
@@ -817,6 +817,8 @@ IDirect3DDeviceImpl_3_AddViewport(IDirect3DDevice3 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
vp
->
next
=
This
->
viewport_list
;
This
->
viewport_list
=
vp
;
vp
->
active_device
=
This
;
/* Viewport must be usable for Clear() after AddViewport,
so set active_device here. */
LeaveCriticalSection
(
&
ddraw_cs
);
return
D3D_OK
;
...
...
dlls/ddraw/viewport.c
View file @
3e237c61
...
...
@@ -312,10 +312,12 @@ IDirect3DViewportImpl_SetViewport(IDirect3DViewport3 *iface,
This
->
viewports
.
vp1
.
dvMaxZ
=
1
.
0
;
if
(
This
->
active_device
)
{
IDirect3DDevice3_GetCurrentViewport
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice3
),
&
current_viewport
);
if
(
ICOM_OBJECT
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
current_viewport
)
==
This
)
This
->
activate
(
This
,
FALSE
);
if
(
current_viewport
)
IDirect3DViewport3_Release
(
current_viewport
);
IDirect3DDevice3_GetCurrentViewport
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice3
),
&
current_viewport
);
if
(
current_viewport
)
{
if
(
ICOM_OBJECT
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
current_viewport
)
==
This
)
This
->
activate
(
This
,
FALSE
);
IDirect3DViewport3_Release
(
current_viewport
);
}
}
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
@@ -900,10 +902,12 @@ IDirect3DViewportImpl_SetViewport2(IDirect3DViewport3 *iface,
memcpy
(
&
(
This
->
viewports
.
vp2
),
lpData
,
lpData
->
dwSize
);
if
(
This
->
active_device
)
{
IDirect3DDevice3_GetCurrentViewport
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice3
),
&
current_viewport
);
if
(
ICOM_OBJECT
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
current_viewport
)
==
This
)
This
->
activate
(
This
,
FALSE
);
IDirect3DViewport3_Release
(
current_viewport
);
IDirect3DDevice3_GetCurrentViewport
(
ICOM_INTERFACE
(
This
->
active_device
,
IDirect3DDevice3
),
&
current_viewport
);
if
(
current_viewport
)
{
if
(
ICOM_OBJECT
(
IDirect3DViewportImpl
,
IDirect3DViewport3
,
current_viewport
)
==
This
)
This
->
activate
(
This
,
FALSE
);
IDirect3DViewport3_Release
(
current_viewport
);
}
}
LeaveCriticalSection
(
&
ddraw_cs
);
...
...
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