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
d993f851
Commit
d993f851
authored
Apr 21, 2009
by
David Adam
Committed by
Alexandre Julliard
Apr 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Add tests for IDirect3D9Device_Reset.
parent
458902b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
device.c
dlls/d3d9/tests/device.c
+39
-0
No files found.
dlls/d3d9/tests/device.c
View file @
d993f851
...
@@ -1049,6 +1049,45 @@ static void test_reset(void)
...
@@ -1049,6 +1049,45 @@ static void test_reset(void)
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
pDevice
);
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
pDevice
);
ok
(
hr
==
D3DERR_DEVICENOTRESET
,
"IDirect3DDevice9_TestCooperativeLevel after a failed reset returned %#x
\n
"
,
hr
);
ok
(
hr
==
D3DERR_DEVICENOTRESET
,
"IDirect3DDevice9_TestCooperativeLevel after a failed reset returned %#x
\n
"
,
hr
);
pDevice
=
NULL
;
IDirect3D9_GetAdapterDisplayMode
(
pD3d
,
D3DADAPTER_DEFAULT
,
&
d3ddm
);
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
)
);
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
d3dpp
.
BackBufferFormat
=
d3ddm
.
Format
;
d3dpp
.
EnableAutoDepthStencil
=
FALSE
;
d3dpp
.
AutoDepthStencilFormat
=
D3DFMT_D24S8
;
hr
=
IDirect3D9_CreateDevice
(
pD3d
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
hwnd
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
d3dpp
,
&
pDevice
);
if
(
FAILED
(
hr
))
{
skip
(
"could not create device, IDirect3D9_CreateDevice returned %#x
\n
"
,
hr
);
goto
cleanup
;
}
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
pDevice
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_TestCooperativeLevel after creation returned %#x
\n
"
,
hr
);
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
BackBufferWidth
=
400
;
d3dpp
.
BackBufferHeight
=
300
;
d3dpp
.
EnableAutoDepthStencil
=
TRUE
;
d3dpp
.
AutoDepthStencilFormat
=
D3DFMT_D24S8
;
hr
=
IDirect3DDevice9_Reset
(
pDevice
,
&
d3dpp
);
todo_wine
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Reset failed with 0x%08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
hr
=
IDirect3DDevice9_GetDepthStencilSurface
(
pDevice
,
&
surface
);
todo_wine
ok
(
hr
==
D3D_OK
,
"GetDepthStencilSurface failed with 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
surface
!=
NULL
,
"Depth stencil should not be NULL
\n
"
);
if
(
surface
)
IDirect3DSurface9_Release
(
surface
);
cleanup:
cleanup:
HeapFree
(
GetProcessHeap
(),
0
,
modes
);
HeapFree
(
GetProcessHeap
(),
0
,
modes
);
if
(
pD3d
)
IDirect3D9_Release
(
pD3d
);
if
(
pD3d
)
IDirect3D9_Release
(
pD3d
);
...
...
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