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
e5de1992
Commit
e5de1992
authored
Jun 17, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Jun 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement IDirect3DRMTextureX_GetClassName.
parent
b2de4130
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
4 deletions
+54
-4
d3drm.c
dlls/d3drm/tests/d3drm.c
+40
-0
texture.c
dlls/d3drm/texture.c
+14
-4
No files found.
dlls/d3drm/tests/d3drm.c
View file @
e5de1992
...
...
@@ -1041,6 +1041,45 @@ static void test_Material2(void)
IDirect3DRM_Release
(
pD3DRM
);
}
static
void
test_Texture
(
void
)
{
HRESULT
hr
;
LPDIRECT3DRM
pD3DRM
;
LPDIRECT3DRMTEXTURE
pTexture
;
D3DRMIMAGE
initimg
=
{
2
,
2
,
1
,
1
,
32
,
TRUE
,
2
*
sizeof
(
DWORD
),
NULL
,
NULL
,
0x000000ff
,
0x0000ff00
,
0x00ff0000
,
0xff000000
,
0
,
NULL
};
DWORD
pixel
[
4
]
=
{
20000
,
30000
,
10000
,
0
};
DWORD
size
;
CHAR
cname
[
64
]
=
{
0
};
hr
=
pDirect3DRMCreate
(
&
pD3DRM
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
initimg
.
buffer1
=
&
pixel
;
hr
=
IDirect3DRM_CreateTexture
(
pD3DRM
,
&
initimg
,
&
pTexture
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMTexture interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRMTexture_GetClassName
(
pTexture
,
NULL
,
cname
);
ok
(
hr
==
E_INVALIDARG
,
"GetClassName failed with %x
\n
"
,
hr
);
hr
=
IDirect3DRMTexture_GetClassName
(
pTexture
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetClassName failed with %x
\n
"
,
hr
);
size
=
1
;
hr
=
IDirect3DRMTexture_GetClassName
(
pTexture
,
&
size
,
cname
);
ok
(
hr
==
E_INVALIDARG
,
"GetClassName failed with %x
\n
"
,
hr
);
size
=
sizeof
(
cname
);
hr
=
IDirect3DRMTexture_GetClassName
(
pTexture
,
&
size
,
cname
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get classname (hr = %x)
\n
"
,
hr
);
ok
(
size
==
sizeof
(
"Texture"
),
"wrong size: %u
\n
"
,
size
);
ok
(
!
strcmp
(
cname
,
"Texture"
),
"Expected cname to be
\"
Texture
\"
, but got
\"
%s
\"\n
"
,
cname
);
IDirect3DRMTexture_Release
(
pTexture
);
IDirect3DRM_Release
(
pD3DRM
);
}
static
void
test_frame_transform
(
void
)
{
HRESULT
hr
;
...
...
@@ -1108,6 +1147,7 @@ START_TEST(d3drm)
test_Frame
();
test_Light
();
test_Material2
();
test_Texture
();
test_frame_transform
();
test_d3drm_load
();
...
...
dlls/d3drm/texture.c
View file @
e5de1992
...
...
@@ -160,9 +160,11 @@ static HRESULT WINAPI IDirect3DRMTexture2Impl_GetName(IDirect3DRMTexture2* iface
static
HRESULT
WINAPI
IDirect3DRMTexture2Impl_GetClassName
(
IDirect3DRMTexture2
*
iface
,
LPDWORD
size
,
LPSTR
name
)
{
FIXME
(
"(%p)->(%p, %p): stub
\n
"
,
iface
,
size
,
nam
e
);
IDirect3DRMTextureImpl
*
This
=
impl_from_IDirect3DRMTexture2
(
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"(%p/%p)->(%p, %p)
\n
"
,
iface
,
This
,
size
,
name
);
return
IDirect3DRMTexture3_GetClassName
(
&
This
->
IDirect3DRMTexture3_iface
,
size
,
name
);
}
/*** IDirect3DRMTexture3 methods ***/
...
...
@@ -522,9 +524,17 @@ static HRESULT WINAPI IDirect3DRMTexture3Impl_GetName(IDirect3DRMTexture3* iface
static
HRESULT
WINAPI
IDirect3DRMTexture3Impl_GetClassName
(
IDirect3DRMTexture3
*
iface
,
LPDWORD
size
,
LPSTR
name
)
{
FIXME
(
"(%p)->(%p, %p): stub
\n
"
,
iface
,
size
,
nam
e
);
IDirect3DRMTextureImpl
*
This
=
impl_from_IDirect3DRMTexture3
(
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"(%p/%p)->(%p, %p)
\n
"
,
iface
,
This
,
size
,
name
);
if
(
!
size
||
*
size
<
strlen
(
"Texture"
)
||
!
name
)
return
E_INVALIDARG
;
strcpy
(
name
,
"Texture"
);
*
size
=
sizeof
(
"Texture"
);
return
D3DRM_OK
;
}
/*** IDirect3DRMTexture3 methods ***/
...
...
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