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
57281caa
Commit
57281caa
authored
Mar 18, 2015
by
Aaryaman Vasishta
Committed by
Alexandre Julliard
Mar 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm/tests: Remove dynamic loading in d3drm.c.
parent
6c0f864c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
46 deletions
+14
-46
d3drm.c
dlls/d3drm/tests/d3drm.c
+14
-46
No files found.
dlls/d3drm/tests/d3drm.c
View file @
57281caa
...
...
@@ -26,10 +26,6 @@
#include "wine/test.h"
static
HMODULE
d3drm_handle
=
0
;
static
HRESULT
(
WINAPI
*
pDirect3DRMCreate
)(
IDirect3DRM
**
d3drm
);
#define CHECK_REFCOUNT(obj,rc) \
{ \
int rc_new = rc; \
...
...
@@ -37,29 +33,6 @@ static HRESULT (WINAPI * pDirect3DRMCreate)(IDirect3DRM **d3drm);
ok(count == rc_new, "Invalid refcount. Expected %d got %d\n", rc_new, count); \
}
#define D3DRM_GET_PROC(func) \
p ## func = (void*)GetProcAddress(d3drm_handle, #func); \
if(!p ## func) { \
trace("GetProcAddress(%s) failed\n", #func); \
FreeLibrary(d3drm_handle); \
return FALSE; \
}
static
BOOL
InitFunctionPtrs
(
void
)
{
d3drm_handle
=
LoadLibraryA
(
"d3drm.dll"
);
if
(
!
d3drm_handle
)
{
skip
(
"Could not load d3drm.dll
\n
"
);
return
FALSE
;
}
D3DRM_GET_PROC
(
Direct3DRMCreate
)
return
TRUE
;
}
static
int
get_refcount
(
IUnknown
*
object
)
{
IUnknown_AddRef
(
object
);
...
...
@@ -242,7 +215,7 @@ static void test_MeshBuilder(void)
D3DCOLOR
color
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateMeshBuilder
(
d3drm
,
&
pMeshBuilder
);
...
...
@@ -538,7 +511,7 @@ static void test_MeshBuilder3(void)
DWORD
size
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirect3DRM_QueryInterface
(
d3drm
,
&
IID_IDirect3DRM3
,
(
void
**
)
&
d3drm3
)))
...
...
@@ -644,7 +617,7 @@ static void test_Mesh(void)
DWORD
size
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateMesh
(
d3drm
,
&
mesh
);
...
...
@@ -685,7 +658,7 @@ static void test_Face(void)
CHAR
cname
[
64
]
=
{
0
};
int
icount
;
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateFace
(
d3drm
,
&
face1
);
...
...
@@ -925,7 +898,7 @@ static void test_Frame(void)
DWORD
count
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateFrame
(
d3drm
,
NULL
,
&
pFrameC
);
...
...
@@ -1257,7 +1230,7 @@ static void test_Viewport(void)
window
=
CreateWindowA
(
"static"
,
"d3drm_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
300
,
200
,
0
,
0
,
0
,
0
);
GetClientRect
(
window
,
&
rc
);
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
DirectDrawCreateClipper
(
0
,
&
pClipper
,
NULL
);
...
...
@@ -1308,7 +1281,7 @@ static void test_Light(void)
DWORD
size
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateLightRGB
(
d3drm
,
D3DRMLIGHT_SPOT
,
0
.
5
,
0
.
5
,
0
.
5
,
&
light
);
...
...
@@ -1363,7 +1336,7 @@ static void test_Material2(void)
DWORD
size
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirect3DRM_QueryInterface
(
d3drm
,
&
IID_IDirect3DRM3
,
(
void
**
)
&
d3drm3
)))
...
...
@@ -1447,7 +1420,7 @@ static void test_Texture(void)
DWORD
size
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
initimg
.
buffer1
=
&
pixel
;
...
...
@@ -1488,7 +1461,7 @@ static void test_Device(void)
window
=
CreateWindowA
(
"static"
,
"d3drm_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
300
,
200
,
0
,
0
,
0
,
0
);
GetClientRect
(
window
,
&
rc
);
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
DirectDrawCreateClipper
(
0
,
&
pClipper
,
NULL
);
...
...
@@ -1551,7 +1524,7 @@ static void test_frame_transform(void)
IDirect3DRMFrame
*
frame
;
D3DRMMATRIX4D
matrix
;
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateFrame
(
d3drm
,
NULL
,
&
frame
);
...
...
@@ -1589,7 +1562,7 @@ static void test_d3drm_load(void)
D3DRMLOADMEMORY
info
;
const
GUID
*
req_refiids
[]
=
{
&
IID_IDirect3DRMMeshBuilder
,
&
IID_IDirect3DRMFrame
,
&
IID_IDirect3DRMMaterial
};
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
info
.
lpMemory
=
data_d3drm_load
;
...
...
@@ -1665,7 +1638,7 @@ static void test_frame_mesh_materials(void)
IDirect3DRMTexture
*
texture
;
int
i
;
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Direct3DRMCreate returned %x
\n
"
,
hr
);
info
.
lpMemory
=
data_frame_mesh_materials
;
...
...
@@ -1860,7 +1833,7 @@ static void test_d3drm_qi(void)
HRESULT
hr
;
IDirect3DRM
*
d3drm
;
hr
=
p
Direct3DRMCreate
(
&
d3drm
);
hr
=
Direct3DRMCreate
(
&
d3drm
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
test_qi
(
"d3drm_qi"
,
(
IUnknown
*
)
d3drm
,
&
IID_IDirect3DRM
,
tests
,
sizeof
(
tests
)
/
sizeof
(
*
tests
));
...
...
@@ -1870,9 +1843,6 @@ static void test_d3drm_qi(void)
START_TEST
(
d3drm
)
{
if
(
!
InitFunctionPtrs
())
return
;
test_MeshBuilder
();
test_MeshBuilder3
();
test_Mesh
();
...
...
@@ -1887,6 +1857,4 @@ START_TEST(d3drm)
test_d3drm_load
();
test_frame_mesh_materials
();
test_d3drm_qi
();
FreeLibrary
(
d3drm_handle
);
}
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