Skip to content

Commit

Permalink
d3d9/tests: Restore display modes at the end of test_wndproc().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Henri Verbeet <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
  • Loading branch information
zzhiyi authored and julliard committed Oct 30, 2020
1 parent 5715b77 commit ddf1967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dlls/d3d9/tests/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -4435,6 +4435,8 @@ static void test_wndproc(void)
CloseHandle(thread_params.test_finished);
CloseHandle(thread_params.window_created);
UnregisterClassA("d3d9_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)
Expand Down

0 comments on commit ddf1967

Please sign in to comment.