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
c453cb70
Commit
c453cb70
authored
Aug 20, 2015
by
Aaryaman Vasishta
Committed by
Alexandre Julliard
Aug 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: GetDirect3DDevice2 returns D3DRM_OK when IDirect3DDevice2 is not available.
parent
ed1d4f86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
device.c
dlls/d3drm/device.c
+3
-1
d3drm.c
dlls/d3drm/tests/d3drm.c
+18
-0
No files found.
dlls/d3drm/device.c
View file @
c453cb70
...
...
@@ -1351,7 +1351,9 @@ static HRESULT WINAPI d3drm_device3_GetDirect3DDevice2(IDirect3DRMDevice3 *iface
TRACE
(
"iface %p, d3d_device %p.
\n
"
,
iface
,
d3d_device
);
return
IDirect3DDevice_QueryInterface
(
device
->
device
,
&
IID_IDirect3DDevice2
,
(
void
**
)
d3d_device
);
IDirect3DDevice_QueryInterface
(
device
->
device
,
&
IID_IDirect3DDevice2
,
(
void
**
)
d3d_device
);
return
D3DRM_OK
;
}
static
HRESULT
WINAPI
d3drm_device3_FindPreferredTextureFormat
(
IDirect3DRMDevice3
*
iface
,
...
...
dlls/d3drm/tests/d3drm.c
View file @
c453cb70
...
...
@@ -3118,7 +3118,10 @@ static void test_create_device_from_d3d1(void)
IDirect3D
*
d3d1
=
NULL
;
IDirect3DRM
*
d3drm1
=
NULL
;
IDirect3DRMDevice
*
device1
=
(
IDirect3DRMDevice
*
)
0xdeadbeef
;
IDirect3DRMDevice2
*
device2
;
IDirect3DRMDevice3
*
device3
;
IDirect3DDevice
*
d3ddevice1
=
NULL
,
*
d3drm_d3ddevice1
=
NULL
;
IDirect3DDevice2
*
d3ddevice2
=
(
IDirect3DDevice2
*
)
0xdeadbeef
;
IDirectDrawSurface
*
surface
=
NULL
,
*
ds
=
NULL
,
*
d3drm_ds
=
NULL
;
DWORD
expected_flags
;
DDSCAPS
caps
=
{
DDSCAPS_ZBUFFER
};
...
...
@@ -3167,6 +3170,21 @@ static void test_create_device_from_d3d1(void)
device_ref2
=
get_refcount
((
IUnknown
*
)
d3ddevice1
);
ok
(
device_ref2
>
device_ref1
,
"Expected device_ref2 > device_ref1, got device_ref1 = %u, device_ref2 = %u.
\n
"
,
device_ref1
,
device_ref2
);
hr
=
IDirect3DRMDevice_QueryInterface
(
device1
,
&
IID_IDirect3DRMDevice2
,
(
void
**
)
&
device2
);
ok
(
SUCCEEDED
(
hr
),
"Cannot get IDirect3DRMDevice2 Interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DRMDevice2_GetDirect3DDevice2
(
device2
,
&
d3ddevice2
);
ok
(
SUCCEEDED
(
hr
),
"Expected hr == DD_OK, got %x).
\n
"
,
hr
);
ok
(
d3ddevice2
==
NULL
,
"Expected d3ddevice2 == NULL, got %p.
\n
"
,
d3ddevice2
);
IDirect3DRMDevice2_Release
(
device2
);
d3ddevice2
=
(
IDirect3DDevice2
*
)
0xdeadbeef
;
hr
=
IDirect3DRMDevice_QueryInterface
(
device1
,
&
IID_IDirect3DRMDevice2
,
(
void
**
)
&
device3
);
ok
(
hr
==
DD_OK
,
"Cannot get IDirect3DRMDevice2 Interface (hr = %x).
\n
"
,
hr
);
hr
=
IDirect3DRMDevice3_GetDirect3DDevice2
(
device3
,
&
d3ddevice2
);
ok
(
hr
==
DD_OK
,
"Expected hr == DD_OK, got %x).
\n
"
,
hr
);
ok
(
d3ddevice2
==
NULL
,
"Expected d3ddevice2 == NULL, got %p.
\n
"
,
d3ddevice2
);
IDirect3DRMDevice3_Release
(
device3
);
hr
=
IDirectDraw_EnumSurfaces
(
ddraw1
,
DDENUMSURFACES_ALL
|
DDENUMSURFACES_DOESEXIST
,
NULL
,
&
surface
,
surface_callback
);
ok
(
hr
==
DD_OK
,
"Failed to enumerate surfaces (hr = %x).
\n
"
,
hr
);
...
...
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