d3d8: Do not modify the "surface" pointer for D3DFMT_UNKNOWN in d3d8_device_CreateRenderTarget().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
71cb1be214
commit
177b3fc7c1
|
@ -990,6 +990,9 @@ static HRESULT WINAPI d3d8_device_CreateRenderTarget(IDirect3DDevice8 *iface, UI
|
||||||
TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, lockable %#x, surface %p.\n",
|
TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, lockable %#x, surface %p.\n",
|
||||||
iface, width, height, format, multisample_type, lockable, surface);
|
iface, width, height, format, multisample_type, lockable, surface);
|
||||||
|
|
||||||
|
if (!format)
|
||||||
|
return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
*surface = NULL;
|
*surface = NULL;
|
||||||
if (lockable)
|
if (lockable)
|
||||||
flags |= WINED3D_TEXTURE_CREATE_MAPPABLE;
|
flags |= WINED3D_TEXTURE_CREATE_MAPPABLE;
|
||||||
|
|
|
@ -8212,7 +8212,7 @@ static void test_format_unknown(void)
|
||||||
hr = IDirect3DDevice8_CreateRenderTarget(device, 64, 64,
|
hr = IDirect3DDevice8_CreateRenderTarget(device, 64, 64,
|
||||||
D3DFMT_UNKNOWN, D3DMULTISAMPLE_NONE, FALSE, (IDirect3DSurface8 **)&iface);
|
D3DFMT_UNKNOWN, D3DMULTISAMPLE_NONE, FALSE, (IDirect3DSurface8 **)&iface);
|
||||||
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
||||||
todo_wine ok(iface == (void *)0xdeadbeef, "Got unexpected iface %p.\n", iface);
|
ok(iface == (void *)0xdeadbeef, "Got unexpected iface %p.\n", iface);
|
||||||
|
|
||||||
iface = (void *)0xdeadbeef;
|
iface = (void *)0xdeadbeef;
|
||||||
hr = IDirect3DDevice8_CreateDepthStencilSurface(device, 64, 64,
|
hr = IDirect3DDevice8_CreateDepthStencilSurface(device, 64, 64,
|
||||||
|
|
Loading…
Reference in New Issue