diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 090ecfc5b80..0058ead1318 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -268,9 +268,12 @@ static void test_get_adapter_displaymode_ex(void) memset(&startmode, 0, sizeof(startmode)); startmode.dmSize = sizeof(startmode); - startmode.dmFields = DM_DISPLAYORIENTATION; - S2(U1(startmode)).dmDisplayOrientation = DMDO_180; + retval = pEnumDisplaySettingsExA(NULL, ENUM_CURRENT_SETTINGS, &startmode, 0); + ok(retval, "Failed to retrieve current display mode, retval %d.\n", retval); + if (!retval) goto out; + startmode.dmFields = DM_DISPLAYORIENTATION | DM_PELSWIDTH | DM_PELSHEIGHT; + S2(U1(startmode)).dmDisplayOrientation = DMDO_180; retval = pChangeDisplaySettingsExA(NULL, &startmode, NULL, 0, NULL); if(retval == DISP_CHANGE_BADMODE)