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
9a1bc10f
Commit
9a1bc10f
authored
Dec 14, 2005
by
Paul Vriens
Committed by
Alexandre Julliard
Dec 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Don't treat missing d3d9.dll as a failure.
parent
dabcbe83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
+24
-12
shader.c
dlls/d3d9/tests/shader.c
+12
-6
stateblock.c
dlls/d3d9/tests/stateblock.c
+12
-6
No files found.
dlls/d3d9/tests/shader.c
View file @
9a1bc10f
...
@@ -20,19 +20,16 @@
...
@@ -20,19 +20,16 @@
#include <d3d9.h>
#include <d3d9.h>
#include "wine/test.h"
#include "wine/test.h"
static
HMODULE
d3d9_handle
=
0
;
static
IDirect3DDevice9
*
init_d3d9
(
void
)
static
IDirect3DDevice9
*
init_d3d9
(
void
)
{
{
IDirect3D9
*
(
__stdcall
*
d3d9_create
)(
UINT
SDKVersion
)
=
0
;
IDirect3D9
*
(
__stdcall
*
d3d9_create
)(
UINT
SDKVersion
)
=
0
;
HMODULE
d3d9_handle
=
0
;
IDirect3D9
*
d3d9_ptr
=
0
;
IDirect3D9
*
d3d9_ptr
=
0
;
IDirect3DDevice9
*
device_ptr
=
0
;
IDirect3DDevice9
*
device_ptr
=
0
;
D3DPRESENT_PARAMETERS
present_parameters
;
D3DPRESENT_PARAMETERS
present_parameters
;
HRESULT
hres
;
HRESULT
hres
;
d3d9_handle
=
LoadLibrary
(
"d3d9"
);
ok
(
d3d9_handle
!=
NULL
,
"Failed to load d3d9.
\n
"
);
if
(
!
d3d9_handle
)
return
NULL
;
d3d9_create
=
(
void
*
)
GetProcAddress
(
d3d9_handle
,
"Direct3DCreate9"
);
d3d9_create
=
(
void
*
)
GetProcAddress
(
d3d9_handle
,
"Direct3DCreate9"
);
ok
(
d3d9_create
!=
NULL
,
"Failed to get address of Direct3DCreate9
\n
"
);
ok
(
d3d9_create
!=
NULL
,
"Failed to get address of Direct3DCreate9
\n
"
);
if
(
!
d3d9_create
)
return
NULL
;
if
(
!
d3d9_create
)
return
NULL
;
...
@@ -136,7 +133,16 @@ static void test_get_set_pixel_shader(IDirect3DDevice9 *device_ptr)
...
@@ -136,7 +133,16 @@ static void test_get_set_pixel_shader(IDirect3DDevice9 *device_ptr)
START_TEST
(
shader
)
START_TEST
(
shader
)
{
{
D3DCAPS9
caps
;
D3DCAPS9
caps
;
IDirect3DDevice9
*
device_ptr
=
init_d3d9
();
IDirect3DDevice9
*
device_ptr
;
d3d9_handle
=
LoadLibraryA
(
"d3d9.dll"
);
if
(
!
d3d9_handle
)
{
trace
(
"Could not load d3d9.dll, skipping tests
\n
"
);
return
;
}
device_ptr
=
init_d3d9
();
if
(
!
device_ptr
)
return
;
if
(
!
device_ptr
)
return
;
IDirect3DDevice9_GetDeviceCaps
(
device_ptr
,
&
caps
);
IDirect3DDevice9_GetDeviceCaps
(
device_ptr
,
&
caps
);
...
...
dlls/d3d9/tests/stateblock.c
View file @
9a1bc10f
...
@@ -19,19 +19,16 @@
...
@@ -19,19 +19,16 @@
#include <d3d9.h>
#include <d3d9.h>
#include "wine/test.h"
#include "wine/test.h"
static
HMODULE
d3d9_handle
=
0
;
static
IDirect3DDevice9
*
init_d3d9
(
void
)
static
IDirect3DDevice9
*
init_d3d9
(
void
)
{
{
IDirect3D9
*
(
__stdcall
*
d3d9_create
)(
UINT
SDKVersion
)
=
0
;
IDirect3D9
*
(
__stdcall
*
d3d9_create
)(
UINT
SDKVersion
)
=
0
;
HMODULE
d3d9_handle
=
0
;
IDirect3D9
*
d3d9_ptr
=
0
;
IDirect3D9
*
d3d9_ptr
=
0
;
IDirect3DDevice9
*
device_ptr
=
0
;
IDirect3DDevice9
*
device_ptr
=
0
;
D3DPRESENT_PARAMETERS
present_parameters
;
D3DPRESENT_PARAMETERS
present_parameters
;
HRESULT
hres
;
HRESULT
hres
;
d3d9_handle
=
LoadLibrary
(
"d3d9"
);
ok
(
d3d9_handle
!=
NULL
,
"Failed to load d3d9.
\n
"
);
if
(
!
d3d9_handle
)
return
NULL
;
d3d9_create
=
(
void
*
)
GetProcAddress
(
d3d9_handle
,
"Direct3DCreate9"
);
d3d9_create
=
(
void
*
)
GetProcAddress
(
d3d9_handle
,
"Direct3DCreate9"
);
ok
(
d3d9_create
!=
NULL
,
"Failed to get address of Direct3DCreate9
\n
"
);
ok
(
d3d9_create
!=
NULL
,
"Failed to get address of Direct3DCreate9
\n
"
);
if
(
!
d3d9_create
)
return
NULL
;
if
(
!
d3d9_create
)
return
NULL
;
...
@@ -83,6 +80,15 @@ static void test_begin_end_state_block(IDirect3DDevice9 *device_ptr)
...
@@ -83,6 +80,15 @@ static void test_begin_end_state_block(IDirect3DDevice9 *device_ptr)
START_TEST
(
stateblock
)
START_TEST
(
stateblock
)
{
{
IDirect3DDevice9
*
device_ptr
=
init_d3d9
();
IDirect3DDevice9
*
device_ptr
;
d3d9_handle
=
LoadLibraryA
(
"d3d9.dll"
);
if
(
!
d3d9_handle
)
{
trace
(
"Could not load d3d9.dll, skipping tests
\n
"
);
return
;
}
device_ptr
=
init_d3d9
();
test_begin_end_state_block
(
device_ptr
);
test_begin_end_state_block
(
device_ptr
);
}
}
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