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
a5d09b6b
Commit
a5d09b6b
authored
Aug 07, 2015
by
Aaryaman Vasishta
Committed by
Alexandre Julliard
Aug 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement IDirect3DRMDevice{2-3}::GetDirect3DDevice2.
parent
27cc84d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
49 deletions
+26
-49
device.c
dlls/d3drm/device.c
+6
-1
d3drm.c
dlls/d3drm/tests/d3drm.c
+20
-48
No files found.
dlls/d3drm/device.c
View file @
a5d09b6b
...
...
@@ -1325,7 +1325,12 @@ static DWORD WINAPI d3drm_device3_GetRenderMode(IDirect3DRMDevice3 *iface)
static
HRESULT
WINAPI
d3drm_device3_GetDirect3DDevice2
(
IDirect3DRMDevice3
*
iface
,
IDirect3DDevice2
**
d3d_device
)
{
FIXME
(
"iface %p, d3d_device %p stub!
\n
"
,
iface
,
d3d_device
);
struct
d3drm_device
*
device
=
impl_from_IDirect3DRMDevice3
(
iface
);
TRACE
(
"iface %p, d3d_device %p.
\n
"
,
iface
,
d3d_device
);
if
(
device
->
device
)
return
IDirect3DDevice_QueryInterface
(
device
->
device
,
&
IID_IDirect3DDevice2
,
(
void
**
)
d3d_device
);
return
E_NOTIMPL
;
}
...
...
dlls/d3drm/tests/d3drm.c
View file @
a5d09b6b
...
...
@@ -2185,9 +2185,7 @@ static void test_create_device_from_clipper2(void)
/* Fetch immediate mode device in order to access render target */
hr
=
IDirect3DRMDevice2_GetDirect3DDevice2
(
device2
,
&
d3ddevice2
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DDevice2_GetRenderTarget
(
d3ddevice2
,
&
surface
);
ok
(
hr
==
DD_OK
,
"Cannot get surface to the render target (hr = %x).
\n
"
,
hr
);
...
...
@@ -2263,7 +2261,7 @@ static void test_create_device_from_clipper2(void)
ref3
=
get_refcount
((
IUnknown
*
)
d3drm2
);
ok
(
ref3
==
ref2
,
"expected ref3 == ref2, got ref2 = %u , ref3 = %u.
\n
"
,
ref2
,
ref3
);
cref2
=
get_refcount
((
IUnknown
*
)
clipper
);
todo_wine
ok
(
cref1
==
cref2
,
"expected cref1 == cref2, got cref1 = %u, cref2 = %u.
\n
"
,
cref1
,
cref2
);
ok
(
cref1
==
cref2
,
"expected cref1 == cref2, got cref1 = %u, cref2 = %u.
\n
"
,
cref1
,
cref2
);
/* Test if render target format follows the screen format */
hr
=
IDirectDraw_GetDisplayMode
(
ddraw
,
&
desc
);
...
...
@@ -2279,9 +2277,7 @@ static void test_create_device_from_clipper2(void)
ok
(
hr
==
D3DRM_OK
,
"Cannot create IDirect3DRMDevice2 interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DRMDevice2_GetDirect3DDevice2
(
device2
,
&
d3ddevice2
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DDevice2_GetRenderTarget
(
d3ddevice2
,
&
surface
);
ok
(
hr
==
DD_OK
,
"Cannot get surface to the render target (hr = %x).
\n
"
,
hr
);
...
...
@@ -2295,23 +2291,13 @@ static void test_create_device_from_clipper2(void)
hr
=
IDirectDraw2_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
cleanup:
if
(
ds
)
IDirectDrawSurface_Release
(
ds
);
if
(
surface
)
IDirectDrawSurface_Release
(
surface
);
if
(
d3ddevice2
)
IDirect3DDevice2_Release
(
d3ddevice2
);
if
(
device2
)
IDirect3DRMDevice2_Release
(
device2
);
if
(
d3drm2
)
IDirect3DRM2_Release
(
d3drm2
);
if
(
d3drm1
)
IDirect3DRM_Release
(
d3drm1
);
if
(
clipper
)
IDirectDrawClipper_Release
(
clipper
);
if
(
ddraw
)
IDirectDraw_Release
(
ddraw
);
IDirectDrawSurface_Release
(
surface
);
IDirect3DDevice2_Release
(
d3ddevice2
);
IDirect3DRMDevice2_Release
(
device2
);
IDirect3DRM2_Release
(
d3drm2
);
IDirect3DRM_Release
(
d3drm1
);
IDirectDrawClipper_Release
(
clipper
);
IDirectDraw_Release
(
ddraw
);
DestroyWindow
(
window
);
}
...
...
@@ -2373,9 +2359,7 @@ static void test_create_device_from_clipper3(void)
/* Fetch immediate mode device in order to access render target */
hr
=
IDirect3DRMDevice3_GetDirect3DDevice2
(
device3
,
&
d3ddevice2
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DDevice2_GetRenderTarget
(
d3ddevice2
,
&
surface
);
ok
(
hr
==
DD_OK
,
"Cannot get surface to the render target (hr = %x).
\n
"
,
hr
);
...
...
@@ -2451,7 +2435,7 @@ static void test_create_device_from_clipper3(void)
ref3
=
get_refcount
((
IUnknown
*
)
d3drm3
);
ok
(
ref3
==
ref2
,
"expected ref3 == ref2, got ref2 = %u , ref3 = %u.
\n
"
,
ref2
,
ref3
);
cref2
=
get_refcount
((
IUnknown
*
)
clipper
);
todo_wine
ok
(
cref1
==
cref2
,
"expected cref1 == cref2, got cref1 = %u, cref2 = %u.
\n
"
,
cref1
,
cref2
);
ok
(
cref1
==
cref2
,
"expected cref1 == cref2, got cref1 = %u, cref2 = %u.
\n
"
,
cref1
,
cref2
);
/* Test if render target format follows the screen format */
hr
=
IDirectDraw_GetDisplayMode
(
ddraw
,
&
desc
);
...
...
@@ -2467,9 +2451,7 @@ static void test_create_device_from_clipper3(void)
ok
(
hr
==
D3DRM_OK
,
"Cannot create IDirect3DRMDevice3 interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DRMDevice3_GetDirect3DDevice2
(
device3
,
&
d3ddevice2
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice2 interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DDevice2_GetRenderTarget
(
d3ddevice2
,
&
surface
);
ok
(
hr
==
DD_OK
,
"Cannot get surface to the render target (hr = %x).
\n
"
,
hr
);
...
...
@@ -2483,23 +2465,13 @@ static void test_create_device_from_clipper3(void)
hr
=
IDirectDraw2_RestoreDisplayMode
(
ddraw
);
ok
(
SUCCEEDED
(
hr
),
"RestoreDisplayMode failed, hr %#x.
\n
"
,
hr
);
cleanup:
if
(
ds
)
IDirectDrawSurface_Release
(
ds
);
if
(
surface
)
IDirectDrawSurface_Release
(
surface
);
if
(
d3ddevice2
)
IDirect3DDevice2_Release
(
d3ddevice2
);
if
(
device3
)
IDirect3DRMDevice3_Release
(
device3
);
if
(
d3drm3
)
IDirect3DRM3_Release
(
d3drm3
);
if
(
d3drm1
)
IDirect3DRM_Release
(
d3drm1
);
if
(
clipper
)
IDirectDrawClipper_Release
(
clipper
);
if
(
ddraw
)
IDirectDraw_Release
(
ddraw
);
IDirectDrawSurface_Release
(
surface
);
IDirect3DDevice2_Release
(
d3ddevice2
);
IDirect3DRMDevice3_Release
(
device3
);
IDirect3DRM3_Release
(
d3drm3
);
IDirect3DRM_Release
(
d3drm1
);
IDirectDrawClipper_Release
(
clipper
);
IDirectDraw_Release
(
ddraw
);
DestroyWindow
(
window
);
}
...
...
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