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
e21a4b29
Commit
e21a4b29
authored
Nov 06, 2012
by
Sam Edwards
Committed by
Alexandre Julliard
Nov 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Add test for IDirect3DDevice9_Reset with BackBufferWidth/Height = 0.
parent
0a81a346
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
device.c
dlls/d3d9/tests/device.c
+50
-0
No files found.
dlls/d3d9/tests/device.c
View file @
e21a4b29
...
...
@@ -860,6 +860,7 @@ static void test_reset(void)
{
HRESULT
hr
;
HWND
hwnd
=
NULL
;
RECT
winrect
;
IDirect3D9
*
pD3d
=
NULL
;
D3DPRESENT_PARAMETERS
d3dpp
;
D3DDISPLAYMODE
d3ddm
,
d3ddm2
;
...
...
@@ -1064,6 +1065,55 @@ static void test_reset(void)
IDirect3DSwapChain9_Release
(
pSwapchain
);
}
winrect
.
left
=
0
;
winrect
.
top
=
0
;
winrect
.
right
=
200
;
winrect
.
bottom
=
150
;
ok
(
AdjustWindowRect
(
&
winrect
,
WS_OVERLAPPEDWINDOW
,
FALSE
),
"AdjustWindowRect failed
\n
"
);
ok
(
SetWindowPos
(
hwnd
,
NULL
,
0
,
0
,
winrect
.
right
-
winrect
.
left
,
winrect
.
bottom
-
winrect
.
top
,
SWP_NOMOVE
|
SWP_NOZORDER
),
"SetWindowPos failed
\n
"
);
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
)
);
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
BackBufferWidth
=
0
;
d3dpp
.
BackBufferHeight
=
0
;
hr
=
IDirect3DDevice9_Reset
(
device1
,
&
d3dpp
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Reset failed with %08x
\n
"
,
hr
);
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
device1
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_TestCooperativeLevel after a successful reset returned %#x
\n
"
,
hr
);
ZeroMemory
(
&
vp
,
sizeof
(
vp
));
hr
=
IDirect3DDevice9_GetViewport
(
device1
,
&
vp
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_GetViewport failed with %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
vp
.
X
==
0
,
"D3DVIEWPORT->X = %d
\n
"
,
vp
.
X
);
ok
(
vp
.
Y
==
0
,
"D3DVIEWPORT->Y = %d
\n
"
,
vp
.
Y
);
todo_wine
ok
(
vp
.
Width
==
200
,
"D3DVIEWPORT->Width = %d
\n
"
,
vp
.
Width
);
todo_wine
ok
(
vp
.
Height
==
150
,
"D3DVIEWPORT->Height = %d
\n
"
,
vp
.
Height
);
ok
(
vp
.
MinZ
==
0
,
"D3DVIEWPORT->MinZ = %f
\n
"
,
vp
.
MinZ
);
ok
(
vp
.
MaxZ
==
1
,
"D3DVIEWPORT->MaxZ = %f
\n
"
,
vp
.
MaxZ
);
}
hr
=
IDirect3DDevice9_GetSwapChain
(
device1
,
0
,
&
pSwapchain
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_GetSwapChain returned %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
));
hr
=
IDirect3DSwapChain9_GetPresentParameters
(
pSwapchain
,
&
d3dpp
);
ok
(
hr
==
D3D_OK
,
"IDirect3DSwapChain9_GetPresentParameters returned %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
todo_wine
ok
(
d3dpp
.
BackBufferWidth
==
200
,
"Back buffer width is %d
\n
"
,
d3dpp
.
BackBufferWidth
);
todo_wine
ok
(
d3dpp
.
BackBufferHeight
==
150
,
"Back buffer height is %d
\n
"
,
d3dpp
.
BackBufferHeight
);
}
IDirect3DSwapChain9_Release
(
pSwapchain
);
}
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
)
);
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
d3dpp
.
Windowed
=
TRUE
;
...
...
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