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
0041c560
Commit
0041c560
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*::GetDirect3DDevice.
parent
1075d711
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
+17
-19
device.c
dlls/d3drm/device.c
+9
-1
d3drm.c
dlls/d3drm/tests/d3drm.c
+8
-18
No files found.
dlls/d3drm/device.c
View file @
0041c560
...
...
@@ -1273,7 +1273,15 @@ static D3DRMTEXTUREQUALITY WINAPI d3drm_device3_GetTextureQuality(IDirect3DRMDev
static
HRESULT
WINAPI
d3drm_device3_GetDirect3DDevice
(
IDirect3DRMDevice3
*
iface
,
IDirect3DDevice
**
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
)
{
*
d3d_device
=
device
->
device
;
IDirect3DDevice_AddRef
(
*
d3d_device
);
return
D3DRM_OK
;
}
return
E_NOTIMPL
;
}
...
...
dlls/d3drm/tests/d3drm.c
View file @
0041c560
...
...
@@ -2012,9 +2012,7 @@ static void test_create_device_from_clipper1(void)
/* Fetch immediate mode device in order to access render target */
hr
=
IDirect3DRMDevice_GetDirect3DDevice
(
device1
,
&
d3ddevice1
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice interface (hr = %x).
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DDevice_QueryInterface
(
d3ddevice1
,
&
IID_IDirectDrawSurface
,
(
void
**
)
&
surface
);
ok
(
hr
==
DD_OK
,
"Cannot get surface to the render target (hr = %x).
\n
"
,
hr
);
...
...
@@ -2088,7 +2086,7 @@ static void test_create_device_from_clipper1(void)
ref2
=
get_refcount
((
IUnknown
*
)
d3drm1
);
ok
(
ref1
==
ref2
,
"expected ref1 == ref2, got ref1 = %u, ref2 = %u.
\n
"
,
ref1
,
ref2
);
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
);
...
...
@@ -2104,9 +2102,7 @@ static void test_create_device_from_clipper1(void)
ok
(
hr
==
D3DRM_OK
,
"Cannot create IDirect3DRMDevice interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DRMDevice_GetDirect3DDevice
(
device1
,
&
d3ddevice1
);
todo_wine
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice interface (hr = %x).
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
ok
(
hr
==
D3DRM_OK
,
"Cannot get IDirect3DDevice interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DDevice_QueryInterface
(
d3ddevice1
,
&
IID_IDirectDrawSurface
,
(
void
**
)
&
surface
);
ok
(
hr
==
DD_OK
,
"Cannot get surface to the render target (hr = %x).
\n
"
,
hr
);
...
...
@@ -2120,20 +2116,14 @@ static void test_create_device_from_clipper1(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
(
d3ddevice1
)
IDirect3DDevice_Release
(
d3ddevice1
);
IDirectDrawSurface_Release
(
surface
);
IDirect3DDevice_Release
(
d3ddevice1
);
IDirect3DRMDevice_Release
(
device1
);
if
(
d3drm1
)
IDirect3DRM_Release
(
d3drm1
);
if
(
clipper
)
IDirectDrawClipper_Release
(
clipper
);
if
(
ddraw
)
IDirectDraw_Release
(
ddraw
);
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