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
cf01bb3d
Commit
cf01bb3d
authored
Sep 09, 2013
by
Michael Müller
Committed by
Alexandre Julliard
Sep 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Test if IDirect3DSwapChain9Ex is available with IDirect3D9(Ex).
parent
edad7dea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+38
-0
No files found.
dlls/d3d9/tests/d3d9ex.c
View file @
cf01bb3d
...
...
@@ -122,6 +122,8 @@ static void test_qi_base_to_ex(void)
IDirect3D9Ex
*
d3d9ex
=
(
void
*
)
0xdeadbeef
;
IDirect3DDevice9
*
device
;
IDirect3DDevice9Ex
*
deviceEx
=
(
void
*
)
0xdeadbeef
;
IDirect3DSwapChain9
*
swapchain
=
NULL
;
IDirect3DSwapChain9Ex
*
swapchainEx
=
(
void
*
)
0xdeadbeef
;
HRESULT
hr
;
HWND
window
=
create_window
();
D3DPRESENT_PARAMETERS
present_parameters
;
...
...
@@ -160,6 +162,22 @@ static void test_qi_base_to_ex(void)
ok
(
deviceEx
==
NULL
,
"QueryInterface returned interface %p, expected NULL
\n
"
,
deviceEx
);
if
(
deviceEx
)
IDirect3DDevice9Ex_Release
(
deviceEx
);
/* Get the implicit swapchain */
hr
=
IDirect3DDevice9_GetSwapChain
(
device
,
0
,
&
swapchain
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the implicit swapchain (%08x).
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirect3DSwapChain9_QueryInterface
(
swapchain
,
&
IID_IDirect3DSwapChain9Ex
,
(
void
**
)
&
swapchainEx
);
ok
(
hr
==
E_NOINTERFACE
,
"IDirect3DSwapChain9::QueryInterface for IID_IDirect3DSwapChain9Ex returned %08x, expected E_NOINTERFACE.
\n
"
,
hr
);
ok
(
swapchainEx
==
NULL
,
"QueryInterface returned interface %p, expected NULL.
\n
"
,
swapchainEx
);
if
(
swapchainEx
)
IDirect3DSwapChain9Ex_Release
(
swapchainEx
);
}
if
(
swapchain
)
IDirect3DSwapChain9_Release
(
swapchain
);
IDirect3DDevice9_Release
(
device
);
out:
...
...
@@ -173,6 +191,8 @@ static void test_qi_ex_to_base(void)
IDirect3D9Ex
*
d3d9ex
;
IDirect3DDevice9
*
device
;
IDirect3DDevice9Ex
*
deviceEx
=
(
void
*
)
0xdeadbeef
;
IDirect3DSwapChain9
*
swapchain
=
NULL
;
IDirect3DSwapChain9Ex
*
swapchainEx
=
(
void
*
)
0xdeadbeef
;
HRESULT
hr
;
HWND
window
=
create_window
();
D3DPRESENT_PARAMETERS
present_parameters
;
...
...
@@ -242,6 +262,24 @@ static void test_qi_ex_to_base(void)
ok
(
ref
==
2
,
"IDirect3DDevice9 refcount is %d, expected 2
\n
"
,
ref
);
ref
=
getref
((
IUnknown
*
)
deviceEx
);
ok
(
ref
==
2
,
"IDirect3DDevice9Ex refcount is %d, expected 2
\n
"
,
ref
);
/* Get the implicit swapchain */
hr
=
IDirect3DDevice9_GetSwapChain
(
device
,
0
,
&
swapchain
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the implicit swapchain (%08x).
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirect3DSwapChain9_QueryInterface
(
swapchain
,
&
IID_IDirect3DSwapChain9Ex
,
(
void
**
)
&
swapchainEx
);
ok
(
hr
==
D3D_OK
,
"IDirect3DSwapChain9::QueryInterface for IID_IDirect3DSwapChain9Ex returned %08x, expected D3D_OK.
\n
"
,
hr
);
ok
(
swapchainEx
!=
NULL
&&
swapchainEx
!=
(
void
*
)
0xdeadbeef
,
"QueryInterface returned interface %p, expected != NULL && != 0xdeadbeef.
\n
"
,
swapchainEx
);
if
(
swapchainEx
)
IDirect3DSwapChain9Ex_Release
(
swapchainEx
);
}
if
(
swapchain
)
IDirect3DSwapChain9_Release
(
swapchain
);
if
(
deviceEx
)
IDirect3DDevice9Ex_Release
(
deviceEx
);
IDirect3DDevice9_Release
(
device
);
...
...
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