Commit dc6af98c authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

ddraw: Handle more cases in hr_ddraw_from_wined3d().

parent c2a20e7f
......@@ -1146,11 +1146,7 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DW
wined3d_mutex_unlock();
switch (hr)
{
case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED;
default: return hr;
}
return hr_ddraw_from_wined3d(hr);
}
static HRESULT WINAPI ddraw4_SetDisplayMode(IDirectDraw4 *iface, DWORD width, DWORD height,
......
......@@ -3931,14 +3931,7 @@ static HRESULT WINAPI ddraw_surface7_UpdateOverlay(IDirectDrawSurface7 *iface, R
src_rect, dst_wined3d_texture, dst_sub_resource_idx, dst_rect, flags);
wined3d_mutex_unlock();
switch (hr)
{
case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS;
case WINEDDERR_NOTAOVERLAYSURFACE: return DDERR_NOTAOVERLAYSURFACE;
case WINEDDERR_OVERLAYNOTVISIBLE: return DDERR_OVERLAYNOTVISIBLE;
default:
return hr;
}
return hr_ddraw_from_wined3d(hr);
}
static HRESULT WINAPI ddraw_surface4_UpdateOverlay(IDirectDrawSurface4 *iface, RECT *src_rect,
......
......@@ -1189,8 +1189,11 @@ hr_ddraw_from_wined3d(HRESULT hr)
{
switch(hr)
{
case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS;
default: return hr;
case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS;
case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED;
case WINEDDERR_NOTAOVERLAYSURFACE: return DDERR_NOTAOVERLAYSURFACE;
case WINEDDERR_OVERLAYNOTVISIBLE: return DDERR_OVERLAYNOTVISIBLE;
default: return hr;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment