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
e0213af9
Commit
e0213af9
authored
Feb 15, 2010
by
Christian Costa
Committed by
Alexandre Julliard
Feb 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Enable GetViewport to retreive data set by SetViewport2 and vice-versa + tests.
parent
720aa5bf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
12 deletions
+34
-12
d3d.c
dlls/ddraw/tests/d3d.c
+0
-0
viewport.c
dlls/ddraw/viewport.c
+34
-12
No files found.
dlls/ddraw/tests/d3d.c
View file @
e0213af9
This diff is collapsed.
Click to expand it.
dlls/ddraw/viewport.c
View file @
e0213af9
...
...
@@ -255,14 +255,25 @@ IDirect3DViewportImpl_GetViewport(IDirect3DViewport3 *iface,
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
lpData
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(
This
->
use_vp2
!=
0
)
{
ERR
(
" Requesting to get a D3DVIEWPORT struct where a D3DVIEWPORT2 was set !
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_INVALIDPARAMS
;
}
dwSize
=
lpData
->
dwSize
;
memset
(
lpData
,
0
,
dwSize
);
memcpy
(
lpData
,
&
(
This
->
viewports
.
vp1
),
dwSize
);
if
(
!
This
->
use_vp2
)
memcpy
(
lpData
,
&
(
This
->
viewports
.
vp1
),
dwSize
);
else
{
D3DVIEWPORT
vp1
;
vp1
.
dwSize
=
sizeof
(
vp1
);
vp1
.
dwX
=
This
->
viewports
.
vp2
.
dwX
;
vp1
.
dwY
=
This
->
viewports
.
vp2
.
dwY
;
vp1
.
dwWidth
=
This
->
viewports
.
vp2
.
dwWidth
;
vp1
.
dwHeight
=
This
->
viewports
.
vp2
.
dwHeight
;
vp1
.
dvMaxX
=
0
.
0
;
vp1
.
dvMaxY
=
0
.
0
;
vp1
.
dvScaleX
=
0
.
0
;
vp1
.
dvScaleY
=
0
.
0
;
vp1
.
dvMinZ
=
This
->
viewports
.
vp2
.
dvMinZ
;
vp1
.
dvMaxZ
=
This
->
viewports
.
vp2
.
dvMaxZ
;
memcpy
(
lpData
,
&
vp1
,
dwSize
);
}
if
(
TRACE_ON
(
d3d7
))
{
TRACE
(
" returning D3DVIEWPORT :
\n
"
);
...
...
@@ -908,14 +919,25 @@ IDirect3DViewportImpl_GetViewport2(IDirect3DViewport3 *iface,
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
lpData
);
EnterCriticalSection
(
&
ddraw_cs
);
if
(
This
->
use_vp2
!=
1
)
{
ERR
(
" Requesting to get a D3DVIEWPORT2 struct where a D3DVIEWPORT was set !
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_INVALIDPARAMS
;
}
dwSize
=
lpData
->
dwSize
;
memset
(
lpData
,
0
,
dwSize
);
memcpy
(
lpData
,
&
(
This
->
viewports
.
vp2
),
dwSize
);
if
(
This
->
use_vp2
)
memcpy
(
lpData
,
&
(
This
->
viewports
.
vp2
),
dwSize
);
else
{
D3DVIEWPORT2
vp2
;
vp2
.
dwSize
=
sizeof
(
vp2
);
vp2
.
dwX
=
This
->
viewports
.
vp1
.
dwX
;
vp2
.
dwY
=
This
->
viewports
.
vp1
.
dwY
;
vp2
.
dwWidth
=
This
->
viewports
.
vp1
.
dwWidth
;
vp2
.
dwHeight
=
This
->
viewports
.
vp1
.
dwHeight
;
vp2
.
dvClipX
=
0
.
0
;
vp2
.
dvClipY
=
0
.
0
;
vp2
.
dvClipWidth
=
0
.
0
;
vp2
.
dvClipHeight
=
0
.
0
;
vp2
.
dvMinZ
=
This
->
viewports
.
vp1
.
dvMinZ
;
vp2
.
dvMaxZ
=
This
->
viewports
.
vp1
.
dvMaxZ
;
memcpy
(
lpData
,
&
vp2
,
dwSize
);
}
if
(
TRACE_ON
(
d3d7
))
{
TRACE
(
" returning D3DVIEWPORT2 :
\n
"
);
...
...
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