mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
d3d9: Allow passing "mode" to IDirect3DDevice9Ex_ResetEx() iff "Windowed" is FALSE.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
de3ca49952
commit
c1cc6e45da
2 changed files with 10 additions and 4 deletions
|
@ -3449,6 +3449,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_ResetEx(IDirect3DDevice9Ex *
|
|||
|
||||
TRACE("iface %p, present_parameters %p, mode %p.\n", iface, present_parameters, mode);
|
||||
|
||||
if (!present_parameters->Windowed == !mode)
|
||||
{
|
||||
WARN("Mode can be passed if and only if Windowed is FALSE.\n");
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
return d3d9_device_reset(device, present_parameters, mode);
|
||||
}
|
||||
|
||||
|
|
|
@ -1465,7 +1465,7 @@ static void test_reset_ex(void)
|
|||
modes[i].RefreshRate = 0;
|
||||
modes[i].ScanLineOrdering = 0;
|
||||
hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, NULL);
|
||||
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &modes[i]);
|
||||
ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9Ex_TestCooperativeLevel(device);
|
||||
|
@ -1665,7 +1665,7 @@ static void test_reset_ex(void)
|
|||
d3dpp.BackBufferHeight = 400;
|
||||
d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8;
|
||||
hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &mode);
|
||||
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
||||
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, NULL);
|
||||
ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9Ex_TestCooperativeLevel(device);
|
||||
|
@ -1673,8 +1673,8 @@ static void test_reset_ex(void)
|
|||
|
||||
width = GetSystemMetrics(SM_CXSCREEN);
|
||||
height = GetSystemMetrics(SM_CYSCREEN);
|
||||
todo_wine ok(width == modes[1].Width, "Screen width is %u, expected %u.\n", width, modes[1].Width);
|
||||
todo_wine ok(height == modes[1].Height, "Screen height is %u, expected %u.\n", height, modes[1].Height);
|
||||
ok(width == modes[1].Width, "Screen width is %u, expected %u.\n", width, modes[1].Width);
|
||||
ok(height == modes[1].Height, "Screen height is %u, expected %u.\n", height, modes[1].Height);
|
||||
|
||||
hr = IDirect3DDevice9Ex_GetScissorRect(device, &rect);
|
||||
ok(SUCCEEDED(hr), "Failed to get scissor rect, hr %#x.\n", hr);
|
||||
|
|
Loading…
Reference in a new issue