ddraw: Don't touch the window during mode setting if we're not in exclusive mode.

This commit is contained in:
Henri Verbeet 2011-05-23 22:11:34 +02:00 committed by Alexandre Julliard
parent 43aac32fd5
commit f147c1e928
2 changed files with 8 additions and 3 deletions

View File

@ -883,8 +883,13 @@ static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD
/* TODO: Lose the primary surface */
hr = wined3d_device_set_display_mode(ddraw->wined3d_device, 0, &Mode);
wined3d_device_restore_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window);
wined3d_device_setup_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window, Width, Height);
if (ddraw->cooperative_level & DDSCL_EXCLUSIVE)
{
wined3d_device_restore_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window);
wined3d_device_setup_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window, Width, Height);
}
LeaveCriticalSection(&ddraw_cs);
switch(hr)
{

View File

@ -4046,7 +4046,7 @@ static void test_coop_level_mode_set(void)
ok(SUCCEEDED(hr), "SetDipslayMode failed, hr %#x.\n", hr);
GetWindowRect(window, &r);
todo_wine ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom,
r.left, r.top, r.right, r.bottom);