Commit 06581b45 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Fix some return values.

parent fadd192c
...@@ -420,9 +420,10 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetCursorProperties(LPDIRECT3DDEVIC ...@@ -420,9 +420,10 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetCursorProperties(LPDIRECT3DDEVIC
TRACE("iface %p, hotspot_x %u, hotspot_y %u, bitmap %p.\n", TRACE("iface %p, hotspot_x %u, hotspot_y %u, bitmap %p.\n",
iface, XHotSpot, YHotSpot, pCursorBitmap); iface, XHotSpot, YHotSpot, pCursorBitmap);
if(!pCursorBitmap) { if (!pCursorBitmap)
WARN("No cursor bitmap, returning WINED3DERR_INVALIDCALL\n"); {
return WINED3DERR_INVALIDCALL; WARN("No cursor bitmap, returning D3DERR_INVALIDCALL.\n");
return D3DERR_INVALIDCALL;
} }
wined3d_mutex_lock(); wined3d_mutex_lock();
...@@ -616,7 +617,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(LPDIRECT3DDE ...@@ -616,7 +617,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH IDirect3DDevice9Impl_Reset(LPDIRECT3DDE
This->notreset = TRUE; This->notreset = TRUE;
wined3d_mutex_unlock(); wined3d_mutex_unlock();
return WINED3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
localParameters.BackBufferWidth = pPresentationParameters->BackBufferWidth; localParameters.BackBufferWidth = pPresentationParameters->BackBufferWidth;
...@@ -2717,7 +2718,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_SetConvolutionMonoKernel(IDirect3DD ...@@ -2717,7 +2718,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_SetConvolutionMonoKernel(IDirect3DD
FIXME("iface %p, width %u, height %u, rows %p, columns %p stub!\n", FIXME("iface %p, width %u, height %u, rows %p, columns %p stub!\n",
iface, width, height, rows, columns); iface, width, height, rows, columns);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(IDirect3DDevice9Ex *iface,
...@@ -2729,7 +2730,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(IDirect3DDevice9Ex *if ...@@ -2729,7 +2730,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_ComposeRects(IDirect3DDevice9Ex *if
iface, src_surface, dst_surface, src_descs, rect_count, iface, src_surface, dst_surface, src_descs, rect_count,
dst_descs, operation, offset_x, offset_y); dst_descs, operation, offset_x, offset_y);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(IDirect3DDevice9Ex *iface,
...@@ -2739,28 +2740,28 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(IDirect3DDevice9Ex *iface ...@@ -2739,28 +2740,28 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_PresentEx(IDirect3DDevice9Ex *iface
FIXME("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p, flags %#x stub!\n", FIXME("iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p, flags %#x stub!\n",
iface, src_rect, dst_rect, dst_window_override, dirty_region, flags); iface, src_rect, dst_rect, dst_window_override, dirty_region, flags);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_GetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT *priority) static HRESULT WINAPI IDirect3DDevice9ExImpl_GetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT *priority)
{ {
FIXME("iface %p, priority %p stub!\n", iface, priority); FIXME("iface %p, priority %p stub!\n", iface, priority);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_SetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT priority) static HRESULT WINAPI IDirect3DDevice9ExImpl_SetGPUThreadPriority(IDirect3DDevice9Ex *iface, INT priority)
{ {
FIXME("iface %p, priority %d stub!\n", iface, priority); FIXME("iface %p, priority %d stub!\n", iface, priority);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_WaitForVBlank(IDirect3DDevice9Ex *iface, UINT swapchain_idx) static HRESULT WINAPI IDirect3DDevice9ExImpl_WaitForVBlank(IDirect3DDevice9Ex *iface, UINT swapchain_idx)
{ {
FIXME("iface %p, swapchain_idx %u stub!\n", iface, swapchain_idx); FIXME("iface %p, swapchain_idx %u stub!\n", iface, swapchain_idx);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckResourceResidency(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckResourceResidency(IDirect3DDevice9Ex *iface,
...@@ -2769,14 +2770,14 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckResourceResidency(IDirect3DDev ...@@ -2769,14 +2770,14 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckResourceResidency(IDirect3DDev
FIXME("iface %p, resources %p, resource_count %u stub!\n", FIXME("iface %p, resources %p, resource_count %u stub!\n",
iface, resources, resource_count); iface, resources, resource_count);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_SetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT max_latency) static HRESULT WINAPI IDirect3DDevice9ExImpl_SetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT max_latency)
{ {
FIXME("iface %p, max_latency %u stub!\n", iface, max_latency); FIXME("iface %p, max_latency %u stub!\n", iface, max_latency);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT *max_latency) static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(IDirect3DDevice9Ex *iface, UINT *max_latency)
...@@ -2785,7 +2786,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(IDirect3DDev ...@@ -2785,7 +2786,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_GetMaximumFrameLatency(IDirect3DDev
*max_latency = 2; *max_latency = 2;
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckDeviceState(IDirect3DDevice9Ex *iface, HWND dst_window) static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckDeviceState(IDirect3DDevice9Ex *iface, HWND dst_window)
...@@ -2797,7 +2798,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckDeviceState(IDirect3DDevice9Ex ...@@ -2797,7 +2798,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CheckDeviceState(IDirect3DDevice9Ex
if (!i++) if (!i++)
FIXME("iface %p, dst_window %p stub!\n", iface, dst_window); FIXME("iface %p, dst_window %p stub!\n", iface, dst_window);
return WINED3D_OK; return D3D_OK;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(IDirect3DDevice9Ex *iface,
...@@ -2809,7 +2810,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(IDirect3DDevic ...@@ -2809,7 +2810,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateRenderTargetEx(IDirect3DDevic
iface, width, height, format, multisample_type, multisample_quality, iface, width, height, format, multisample_type, multisample_quality,
lockable, surface, shared_handle, usage); lockable, surface, shared_handle, usage);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(IDirect3DDevice9Ex *iface,
...@@ -2819,7 +2820,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(IDire ...@@ -2819,7 +2820,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateOffscreenPlainSurfaceEx(IDire
FIXME("iface %p, width %u, height %u, format %#x, pool %#x, surface %p, shared_handle %p, usage %#x stub!\n", FIXME("iface %p, width %u, height %u, format %#x, pool %#x, surface %p, shared_handle %p, usage %#x stub!\n",
iface, width, height, format, pool, surface, shared_handle, usage); iface, width, height, format, pool, surface, shared_handle, usage);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(IDirect3DDevice9Ex *iface,
...@@ -2831,7 +2832,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(IDirect ...@@ -2831,7 +2832,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_CreateDepthStencilSurfaceEx(IDirect
iface, width, height, format, multisample_type, multisample_quality, iface, width, height, format, multisample_type, multisample_quality,
discard, surface, shared_handle, usage); discard, surface, shared_handle, usage);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(IDirect3DDevice9Ex *iface,
...@@ -2839,7 +2840,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(IDirect3DDevice9Ex *iface, ...@@ -2839,7 +2840,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_ResetEx(IDirect3DDevice9Ex *iface,
{ {
FIXME("iface %p, present_parameters %p, mode %p stub!\n", iface, present_parameters, mode); FIXME("iface %p, present_parameters %p, mode %p stub!\n", iface, present_parameters, mode);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(IDirect3DDevice9Ex *iface, static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(IDirect3DDevice9Ex *iface,
...@@ -2847,7 +2848,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(IDirect3DDevice9 ...@@ -2847,7 +2848,7 @@ static HRESULT WINAPI IDirect3DDevice9ExImpl_GetDisplayModeEx(IDirect3DDevice9
{ {
FIXME("iface %p, swapchain_idx %u, mode %p, rotation %p stub!\n", iface, swapchain_idx, mode, rotation); FIXME("iface %p, swapchain_idx %u, mode %p, rotation %p stub!\n", iface, swapchain_idx, mode, rotation);
return WINED3DERR_INVALIDCALL; return E_NOTIMPL;
} }
static const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl = static const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl =
......
...@@ -325,8 +325,9 @@ static HRESULT WINAPI IDirect3DSurface9Impl_ReleaseDC(LPDIRECT3DSURFACE9 iface, ...@@ -325,8 +325,9 @@ static HRESULT WINAPI IDirect3DSurface9Impl_ReleaseDC(LPDIRECT3DSURFACE9 iface,
hr = IWineD3DSurface_ReleaseDC(This->wineD3DSurface, hdc); hr = IWineD3DSurface_ReleaseDC(This->wineD3DSurface, hdc);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
switch(hr) { switch (hr)
case WINEDDERR_NODC: return WINED3DERR_INVALIDCALL; {
case WINEDDERR_NODC: return D3DERR_INVALIDCALL;
default: return hr; 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