Module: wine Branch: master Commit: 2256a7e804b1767ea827f6c908c404c95e1810e4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2256a7e804b1767ea827f6c908...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Jul 28 22:27:54 2011 +0200
wined3d: wined3d_device_evict_managed_resources() doesn't need a return value.
---
dlls/d3d8/device.c | 5 ++--- dlls/d3d9/device.c | 5 ++--- dlls/ddraw/ddraw.c | 8 ++++---- dlls/wined3d/device.c | 4 +--- include/wine/wined3d.h | 2 +- 5 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 5c4568d..e93976e 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -361,16 +361,15 @@ static HRESULT WINAPI IDirect3DDevice8Impl_ResourceManagerDiscardBytes(IDirect3D DWORD Bytes) { IDirect3DDevice8Impl *This = impl_from_IDirect3DDevice8(iface); - HRESULT hr;
TRACE("iface %p, byte_count %u.\n", iface, Bytes); if (Bytes) FIXME("Byte count ignored.\n");
wined3d_mutex_lock(); - hr = wined3d_device_evict_managed_resources(This->wined3d_device); + wined3d_device_evict_managed_resources(This->wined3d_device); wined3d_mutex_unlock();
- return hr; + return D3D_OK; }
static HRESULT WINAPI IDirect3DDevice8Impl_GetDirect3D(IDirect3DDevice8 *iface, IDirect3D8 **ppD3D8) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 74d8383..2456e16 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -304,15 +304,14 @@ static UINT WINAPI IDirect3DDevice9Impl_GetAvailableTextureMem(IDirect3DDevice9E static HRESULT WINAPI IDirect3DDevice9Impl_EvictManagedResources(IDirect3DDevice9Ex *iface) { IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface); - HRESULT hr;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); - hr = wined3d_device_evict_managed_resources(This->wined3d_device); + wined3d_device_evict_managed_resources(This->wined3d_device); wined3d_mutex_unlock();
- return hr; + return D3D_OK; }
static HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(IDirect3DDevice9Ex *iface, diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 40d27ed..70e8895 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -5158,15 +5158,15 @@ static HRESULT WINAPI d3d3_EnumZBufferFormats(IDirect3D3 *iface, REFCLSID device static HRESULT WINAPI d3d7_EvictManagedTextures(IDirect3D7 *iface) { IDirectDrawImpl *This = impl_from_IDirect3D7(iface); - HRESULT hr; + TRACE("iface %p!\n", iface);
EnterCriticalSection(&ddraw_cs); - if (!This->d3d_initialized) hr = D3D_OK; - else hr = wined3d_device_evict_managed_resources(This->wined3d_device); + if (This->d3d_initialized) + wined3d_device_evict_managed_resources(This->wined3d_device); LeaveCriticalSection(&ddraw_cs);
- return hr; + return D3D_OK; }
static HRESULT WINAPI d3d3_EvictManagedTextures(IDirect3D3 *iface) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 16327e4..84c7789 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5386,7 +5386,7 @@ BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show) return oldVisible; }
-HRESULT CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) +void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) { struct wined3d_resource *resource, *cursor;
@@ -5405,8 +5405,6 @@ HRESULT CDECL wined3d_device_evict_managed_resources(struct wined3d_device *devi
/* Invalidate stream sources, the buffer(s) may have been evicted. */ device_invalidate_state(device, STATE_STREAMSRC); - - return WINED3D_OK; }
static HRESULT updateSurfaceDesc(struct wined3d_surface *surface, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 0a09ec6..bfc1b39 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2204,7 +2204,7 @@ HRESULT __cdecl wined3d_device_draw_tri_patch(struct wined3d_device *device, UIN const float *num_segs, const WINED3DTRIPATCH_INFO *tri_patch_info); HRESULT __cdecl wined3d_device_end_scene(struct wined3d_device *device); HRESULT __cdecl wined3d_device_end_stateblock(struct wined3d_device *device, struct wined3d_stateblock **stateblock); -HRESULT __cdecl wined3d_device_evict_managed_resources(struct wined3d_device *device); +void __cdecl wined3d_device_evict_managed_resources(struct wined3d_device *device); UINT __cdecl wined3d_device_get_available_texture_mem(struct wined3d_device *device); HRESULT __cdecl wined3d_device_get_back_buffer(struct wined3d_device *device, UINT swapchain_idx, UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, struct wined3d_surface **backbuffer);