d3drm: Return ~0u from d3drm_viewport2_GetProjection() for uninitialised viewports.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jeff Smith 2020-01-28 16:17:43 +03:30 committed by Alexandre Julliard
parent afb09525b5
commit 5f9ceed14f
2 changed files with 5 additions and 2 deletions

View File

@ -2152,7 +2152,7 @@ static void test_Viewport(void)
back = IDirect3DRMViewport_GetBack(viewport);
ok(back == -1.0f, "Got unexpected back %.8e\n", back);
projection = IDirect3DRMViewport_GetProjection(viewport);
todo_wine ok(projection == ~0u, "Got unexpected projection type %#x.\n", projection);
ok(projection == ~0u, "Got unexpected projection type %#x.\n", projection);
hr = IDirect3DRMViewport_SetCamera(viewport, frame);
ok(hr == D3DRMERR_BADOBJECT, "Got unexpected hr %#x.\n", hr);
@ -2345,7 +2345,7 @@ static void test_Viewport(void)
back = IDirect3DRMViewport2_GetBack(viewport2);
ok(back == -1.0f, "Got unexpected back %.8e\n", back);
projection = IDirect3DRMViewport2_GetProjection(viewport2);
todo_wine ok(projection == ~0u, "Got unexpected projection type %#x.\n", projection);
ok(projection == ~0u, "Got unexpected projection type %#x.\n", projection);
hr = IDirect3DRMViewport2_SetCamera(viewport2, frame3);
ok(hr == D3DRMERR_BADOBJECT, "Got unexpected hr %#x.\n", hr);

View File

@ -978,6 +978,9 @@ static D3DRMPROJECTIONTYPE WINAPI d3drm_viewport2_GetProjection(IDirect3DRMViewp
TRACE("iface %p.\n", iface);
if (!viewport->d3d_viewport)
return ~0u;
return viewport->projection;
}