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
84da62d9
Commit
84da62d9
authored
Nov 19, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Create the d3d9ex object in create_device().
parent
79f0b4d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+14
-16
No files found.
dlls/d3d9/tests/d3d9ex.c
View file @
84da62d9
...
...
@@ -49,11 +49,15 @@ static HWND create_window(void)
return
ret
;
}
static
IDirect3DDevice9Ex
*
create_device
(
IDirect3D9Ex
*
d3d9
,
HWND
device_window
,
HWND
focus_window
,
BOOL
windowed
)
static
IDirect3DDevice9Ex
*
create_device
(
HWND
device_window
,
HWND
focus_window
,
BOOL
windowed
)
{
D3DPRESENT_PARAMETERS
present_parameters
=
{
0
};
IDirect3DDevice9Ex
*
device
;
D3DDISPLAYMODEEX
mode
,
*
m
;
IDirect3D9Ex
*
d3d9
;
if
(
FAILED
(
pDirect3DCreate9Ex
(
D3D_SDK_VERSION
,
&
d3d9
)))
return
NULL
;
present_parameters
.
Windowed
=
windowed
;
present_parameters
.
hDeviceWindow
=
device_window
;
...
...
@@ -73,16 +77,20 @@ static IDirect3DDevice9Ex *create_device(IDirect3D9Ex *d3d9, HWND device_window,
m
=
windowed
?
NULL
:
&
mode
;
if
(
SUCCEEDED
(
IDirect3D9Ex_CreateDeviceEx
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
focus_window
,
D3DCREATE_HARDWARE_VERTEXPROCESSING
,
&
present_parameters
,
m
,
&
device
)))
return
devic
e
;
D3DCREATE_HARDWARE_VERTEXPROCESSING
,
&
present_parameters
,
m
,
&
device
)))
goto
don
e
;
present_parameters
.
AutoDepthStencilFormat
=
D3DFMT_D16
;
if
(
SUCCEEDED
(
IDirect3D9Ex_CreateDeviceEx
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
focus_window
,
D3DCREATE_HARDWARE_VERTEXPROCESSING
,
&
present_parameters
,
m
,
&
device
)))
return
devic
e
;
D3DCREATE_HARDWARE_VERTEXPROCESSING
,
&
present_parameters
,
m
,
&
device
)))
goto
don
e
;
if
(
SUCCEEDED
(
IDirect3D9Ex_CreateDeviceEx
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
focus_window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
present_parameters
,
m
,
&
device
)))
return
device
;
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
present_parameters
,
m
,
&
device
)))
goto
done
;
device
=
NULL
;
return
NULL
;
done:
IDirect3D9Ex_Release
(
d3d9
);
return
device
;
}
static
ULONG
getref
(
IUnknown
*
obj
)
{
...
...
@@ -387,21 +395,13 @@ static void test_texture_sysmem_create(void)
IDirect3DDevice9Ex
*
device
;
IDirect3DTexture9
*
texture
;
D3DLOCKED_RECT
locked_rect
;
IDirect3D9Ex
*
d3d9
;
UINT
refcount
;
HWND
window
;
HRESULT
hr
;
void
*
mem
;
if
(
FAILED
(
hr
=
pDirect3DCreate9Ex
(
D3D_SDK_VERSION
,
&
d3d9
)))
{
skip
(
"Failed to create IDirect3D9Ex object (hr %#x), skipping tests.
\n
"
,
hr
);
return
;
}
window
=
create_window
();
device
=
create_device
(
d3d9
,
window
,
window
,
TRUE
);
if
(
!
device
)
if
(
!
(
device
=
create_device
(
window
,
window
,
TRUE
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
done
;
...
...
@@ -428,8 +428,6 @@ static void test_texture_sysmem_create(void)
done:
DestroyWindow
(
window
);
if
(
d3d9
)
IDirect3D9Ex_Release
(
d3d9
);
}
START_TEST
(
d3d9ex
)
...
...
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