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
4dc0ee57
Commit
4dc0ee57
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 IDirect3DRMViewportX_GetClassName.
parent
d9ec2b6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
6 deletions
+70
-6
d3drm.c
dlls/d3drm/tests/d3drm.c
+58
-0
viewport.c
dlls/d3drm/viewport.c
+12
-6
No files found.
dlls/d3drm/tests/d3drm.c
View file @
4dc0ee57
...
@@ -906,6 +906,63 @@ static void test_Frame(void)
...
@@ -906,6 +906,63 @@ static void test_Frame(void)
IDirect3DRM_Release
(
pD3DRM
);
IDirect3DRM_Release
(
pD3DRM
);
}
}
static
void
test_Viewport
(
void
)
{
HRESULT
hr
;
LPDIRECT3DRM
pD3DRM
;
LPDIRECTDRAWCLIPPER
pClipper
;
LPDIRECT3DRMDEVICE
pDevice
;
LPDIRECT3DRMFRAME
pFrame
;
LPDIRECT3DRMVIEWPORT
pViewport
;
GUID
driver
;
HWND
window
;
RECT
rc
;
DWORD
size
;
CHAR
cname
[
64
]
=
{
0
};
window
=
CreateWindowA
(
"static"
,
"d3drm_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
300
,
200
,
0
,
0
,
0
,
0
);
GetClientRect
(
window
,
&
rc
);
hr
=
pDirect3DRMCreate
(
&
pD3DRM
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRM interface (hr = %x)
\n
"
,
hr
);
hr
=
DirectDrawCreateClipper
(
0
,
&
pClipper
,
NULL
);
ok
(
hr
==
DD_OK
,
"Cannot get IDirectDrawClipper interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirectDrawClipper_SetHWnd
(
pClipper
,
0
,
window
);
ok
(
hr
==
DD_OK
,
"Cannot set HWnd to Clipper (hr = %x)
\n
"
,
hr
);
memcpy
(
&
driver
,
&
IID_IDirect3DRGBDevice
,
sizeof
(
GUID
));
hr
=
IDirect3DRM3_CreateDeviceFromClipper
(
pD3DRM
,
pClipper
,
&
driver
,
rc
.
right
,
rc
.
bottom
,
&
pDevice
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMDevice interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateFrame
(
pD3DRM
,
NULL
,
&
pFrame
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMFrame interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRM_CreateViewport
(
pD3DRM
,
pDevice
,
pFrame
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
,
&
pViewport
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DRMViewport interface (hr = %x)
\n
"
,
hr
);
hr
=
IDirect3DRMViewport_GetClassName
(
pViewport
,
NULL
,
cname
);
ok
(
hr
==
E_INVALIDARG
,
"GetClassName failed with %x
\n
"
,
hr
);
hr
=
IDirect3DRMViewport_GetClassName
(
pViewport
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"GetClassName failed with %x
\n
"
,
hr
);
size
=
1
;
hr
=
IDirect3DRMViewport_GetClassName
(
pViewport
,
&
size
,
cname
);
ok
(
hr
==
E_INVALIDARG
,
"GetClassName failed with %x
\n
"
,
hr
);
size
=
sizeof
(
cname
);
hr
=
IDirect3DRMViewport_GetClassName
(
pViewport
,
&
size
,
cname
);
ok
(
hr
==
D3DRM_OK
,
"Cannot get classname (hr = %x)
\n
"
,
hr
);
ok
(
size
==
sizeof
(
"Viewport"
),
"wrong size: %u
\n
"
,
size
);
ok
(
!
strcmp
(
cname
,
"Viewport"
),
"Expected cname to be
\"
Viewport
\"
, but got
\"
%s
\"\n
"
,
cname
);
IDirect3DRMViewport_Release
(
pViewport
);
IDirect3DRMFrame_Release
(
pFrame
);
IDirect3DRMDevice_Release
(
pDevice
);
IDirectDrawClipper_Release
(
pClipper
);
IDirect3DRM_Release
(
pD3DRM
);
}
static
void
test_Light
(
void
)
static
void
test_Light
(
void
)
{
{
HRESULT
hr
;
HRESULT
hr
;
...
@@ -1220,6 +1277,7 @@ START_TEST(d3drm)
...
@@ -1220,6 +1277,7 @@ START_TEST(d3drm)
test_Mesh
();
test_Mesh
();
test_Frame
();
test_Frame
();
test_Device
();
test_Device
();
test_Viewport
();
test_Light
();
test_Light
();
test_Material2
();
test_Material2
();
test_Texture
();
test_Texture
();
...
...
dlls/d3drm/viewport.c
View file @
4dc0ee57
...
@@ -177,13 +177,13 @@ static HRESULT WINAPI IDirect3DRMViewportImpl_GetName(IDirect3DRMViewport* iface
...
@@ -177,13 +177,13 @@ static HRESULT WINAPI IDirect3DRMViewportImpl_GetName(IDirect3DRMViewport* iface
}
}
static
HRESULT
WINAPI
IDirect3DRMViewportImpl_GetClassName
(
IDirect3DRMViewport
*
iface
,
static
HRESULT
WINAPI
IDirect3DRMViewportImpl_GetClassName
(
IDirect3DRMViewport
*
iface
,
LPDWORD
size
,
LPSTR
name
)
LPDWORD
size
,
LPSTR
name
)
{
{
IDirect3DRMViewportImpl
*
This
=
impl_from_IDirect3DRMViewport
(
iface
);
IDirect3DRMViewportImpl
*
This
=
impl_from_IDirect3DRMViewport
(
iface
);
FIXME
(
"(%p/%p)->(%p, %p): stub
\n
"
,
iface
,
This
,
size
,
name
);
TRACE
(
"(%p/%p)->(%p, %p)
\n
"
,
iface
,
This
,
size
,
name
);
return
E_NOTIMPL
;
return
IDirect3DRMViewport2_GetClassName
(
&
This
->
IDirect3DRMViewport2_iface
,
size
,
name
)
;
}
}
/*** IDirect3DRMViewport methods ***/
/*** IDirect3DRMViewport methods ***/
...
@@ -598,13 +598,19 @@ static HRESULT WINAPI IDirect3DRMViewport2Impl_GetName(IDirect3DRMViewport2* ifa
...
@@ -598,13 +598,19 @@ static HRESULT WINAPI IDirect3DRMViewport2Impl_GetName(IDirect3DRMViewport2* ifa
}
}
static
HRESULT
WINAPI
IDirect3DRMViewport2Impl_GetClassName
(
IDirect3DRMViewport2
*
iface
,
static
HRESULT
WINAPI
IDirect3DRMViewport2Impl_GetClassName
(
IDirect3DRMViewport2
*
iface
,
LPDWORD
size
,
LPSTR
name
)
LPDWORD
size
,
LPSTR
name
)
{
{
IDirect3DRMViewportImpl
*
This
=
impl_from_IDirect3DRMViewport2
(
iface
);
IDirect3DRMViewportImpl
*
This
=
impl_from_IDirect3DRMViewport2
(
iface
);
FIXME
(
"(%p/%p)->(%p, %p): stub
\n
"
,
iface
,
This
,
size
,
name
);
TRACE
(
"(%p/%p)->(%p, %p)
\n
"
,
iface
,
This
,
size
,
name
);
return
E_NOTIMPL
;
if
(
!
size
||
*
size
<
strlen
(
"Viewport"
)
||
!
name
)
return
E_INVALIDARG
;
strcpy
(
name
,
"Viewport"
);
*
size
=
sizeof
(
"Viewport"
);
return
D3DRM_OK
;
}
}
/*** IDirect3DRMViewport methods ***/
/*** IDirect3DRMViewport 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