d3d8/tests: Restore display modes at the end of test_wndproc().

test_wndproc() makes a series of ChangeDisplaySettings() calls that could make the current display
mode no longer match the registry display mode. Restore display modes at the end of test_wndproc()
so that other tests are not affected.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2020-10-30 14:45:00 +08:00 committed by Alexandre Julliard
parent 3641c80244
commit 5715b77e87
1 changed files with 2 additions and 0 deletions

View File

@ -3361,6 +3361,8 @@ done:
DestroyWindow(device_window);
DestroyWindow(focus_window);
UnregisterClassA("d3d8_test_wndproc_wc", GetModuleHandleA(NULL));
change_ret = ChangeDisplaySettingsExW(NULL, NULL, NULL, 0, NULL);
ok(change_ret == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExW failed with %d.\n", change_ret);
}
static void test_wndproc_windowed(void)