Commit ceba01e2 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3drm: Add viewport to the device before setting viewport parameters.

parent 8c0c82d7
...@@ -339,6 +339,9 @@ static HRESULT WINAPI d3drm_viewport2_Init(IDirect3DRMViewport2 *iface, IDirect3 ...@@ -339,6 +339,9 @@ static HRESULT WINAPI d3drm_viewport2_Init(IDirect3DRMViewport2 *iface, IDirect3
if (FAILED(hr = IDirect3D_CreateViewport(d3d1, &viewport->d3d_viewport, NULL))) if (FAILED(hr = IDirect3D_CreateViewport(d3d1, &viewport->d3d_viewport, NULL)))
goto cleanup; goto cleanup;
if (FAILED(hr = IDirect3DDevice_AddViewport(d3d_device, viewport->d3d_viewport)))
goto cleanup;
vp.dwSize = sizeof(vp); vp.dwSize = sizeof(vp);
vp.dwWidth = width; vp.dwWidth = width;
vp.dwHeight = height; vp.dwHeight = height;
...@@ -355,9 +358,6 @@ static HRESULT WINAPI d3drm_viewport2_Init(IDirect3DRMViewport2 *iface, IDirect3 ...@@ -355,9 +358,6 @@ static HRESULT WINAPI d3drm_viewport2_Init(IDirect3DRMViewport2 *iface, IDirect3
if (FAILED(hr = IDirect3DViewport_SetViewport(viewport->d3d_viewport, &vp))) if (FAILED(hr = IDirect3DViewport_SetViewport(viewport->d3d_viewport, &vp)))
goto cleanup; goto cleanup;
if (FAILED(hr = IDirect3DDevice_AddViewport(d3d_device, viewport->d3d_viewport)))
goto cleanup;
if (FAILED(hr = IDirect3DRMFrame3_QueryInterface(camera, &IID_IDirect3DRMFrame, (void **)&viewport->camera))) if (FAILED(hr = IDirect3DRMFrame3_QueryInterface(camera, &IID_IDirect3DRMFrame, (void **)&viewport->camera)))
goto cleanup; goto cleanup;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment