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
9fb27d7a
Commit
9fb27d7a
authored
Nov 07, 2012
by
Sam Edwards
Committed by
Alexandre Julliard
Nov 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8/tests: Add test for IDirect3DDevice8_Reset with BackBufferWidth/Height = 0.
parent
39ec8ce6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
device.c
dlls/d3d8/tests/device.c
+46
-0
No files found.
dlls/d3d8/tests/device.c
View file @
9fb27d7a
...
...
@@ -1018,6 +1018,7 @@ static void test_reset(void)
IDirect3D8
*
d3d8
=
NULL
;
UINT
mode_count
=
0
;
HWND
window
=
NULL
;
RECT
winrect
;
D3DVIEWPORT8
vp
;
D3DCAPS8
caps
;
DWORD
shader
;
...
...
@@ -1218,6 +1219,51 @@ static void test_reset(void)
surface_desc
.
Height
);
IDirect3DSurface8_Release
(
surface
);
winrect
.
left
=
0
;
winrect
.
top
=
0
;
winrect
.
right
=
200
;
winrect
.
bottom
=
150
;
ok
(
AdjustWindowRect
(
&
winrect
,
WS_OVERLAPPEDWINDOW
,
FALSE
),
"AdjustWindowRect failed
\n
"
);
ok
(
SetWindowPos
(
window
,
NULL
,
0
,
0
,
winrect
.
right
-
winrect
.
left
,
winrect
.
bottom
-
winrect
.
top
,
SWP_NOMOVE
|
SWP_NOZORDER
),
"SetWindowPos failed
\n
"
);
memset
(
&
d3dpp
,
0
,
sizeof
(
d3dpp
));
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
BackBufferWidth
=
0
;
d3dpp
.
BackBufferHeight
=
0
;
d3dpp
.
BackBufferFormat
=
d3ddm
.
Format
;
hr
=
IDirect3DDevice8_Reset
(
device1
,
&
d3dpp
);
ok
(
SUCCEEDED
(
hr
),
"Reset failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_TestCooperativeLevel
(
device1
);
ok
(
SUCCEEDED
(
hr
),
"TestCooperativeLevel failed, hr %#x.
\n
"
,
hr
);
memset
(
&
vp
,
0
,
sizeof
(
vp
));
hr
=
IDirect3DDevice8_GetViewport
(
device1
,
&
vp
);
ok
(
SUCCEEDED
(
hr
),
"GetViewport failed, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
ok
(
vp
.
X
==
0
,
"D3DVIEWPORT->X = %u, expected 0.
\n
"
,
vp
.
X
);
ok
(
vp
.
Y
==
0
,
"D3DVIEWPORT->Y = %u, expected 0.
\n
"
,
vp
.
Y
);
todo_wine
ok
(
vp
.
Width
==
200
,
"D3DVIEWPORT->Width = %u, expected 200.
\n
"
,
vp
.
Width
);
todo_wine
ok
(
vp
.
Height
==
150
,
"D3DVIEWPORT->Height = %u, expected 150.
\n
"
,
vp
.
Height
);
ok
(
vp
.
MinZ
==
0
,
"D3DVIEWPORT->MinZ = %.8e, expected 0.
\n
"
,
vp
.
MinZ
);
ok
(
vp
.
MaxZ
==
1
,
"D3DVIEWPORT->MaxZ = %.8e, expected 1.
\n
"
,
vp
.
MaxZ
);
}
hr
=
IDirect3DDevice8_GetRenderTarget
(
device1
,
&
surface
);
ok
(
SUCCEEDED
(
hr
),
"GetRenderTarget failed, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DSurface8_GetDesc
(
surface
,
&
surface_desc
);
ok
(
hr
==
D3D_OK
,
"GetDesc failed, hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
surface_desc
.
Width
==
200
,
"Back buffer width is %u, expected 200.
\n
"
,
surface_desc
.
Width
);
todo_wine
ok
(
surface_desc
.
Height
==
150
,
"Back buffer height is %u, expected 150.
\n
"
,
surface_desc
.
Height
);
IDirect3DSurface8_Release
(
surface
);
memset
(
&
d3dpp
,
0
,
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