ddraw: Handle more cases in hr_ddraw_from_wined3d().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Zhiyi Zhang 2020-04-21 21:37:17 +08:00 committed by Alexandre Julliard
parent c2a20e7f59
commit dc6af98c11
3 changed files with 7 additions and 15 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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;
}
}