ddraw: SetDisplayMode may fail.
This commit is contained in:
parent
8de07265a6
commit
df75a7e007
|
@ -614,7 +614,7 @@ IDirectDrawImpl_SetDisplayMode(IDirectDraw7 *iface,
|
|||
LeaveCriticalSection(&ddraw_cs);
|
||||
switch(hr)
|
||||
{
|
||||
case WINED3DERR_NOTAVAILABLE: return DDERR_INVALIDMODE;
|
||||
case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED;
|
||||
default: return hr;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -61,8 +61,12 @@ static BOOL createObjects(void)
|
|||
hr = IDirectDraw7_SetDisplayMode(DirectDraw, 640, 480, 24, 0, 0);
|
||||
|
||||
}
|
||||
ok(hr == DD_OK, "IDirectDraw7_SetDisplayMode failed with %08x\n", hr);
|
||||
if(FAILED(hr)) goto err;
|
||||
ok(hr == DD_OK || hr == DDERR_UNSUPPORTED, "IDirectDraw7_SetDisplayMode failed with %08x\n", hr);
|
||||
if(FAILED(hr)) {
|
||||
/* use trace, the caller calls skip() */
|
||||
trace("SetDisplayMode failed\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
hr = IDirectDraw7_QueryInterface(DirectDraw, &IID_IDirect3D7, (void**) &Direct3D);
|
||||
if (hr == E_NOINTERFACE) goto err;
|
||||
|
|
Loading…
Reference in New Issue