diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index b80eac65db..bc94a5ad2b 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -780,7 +780,7 @@ static HRESULT STDMETHODCALLTYPE buffer_FreePrivateData(IWineD3DBuffer *iface, R static DWORD STDMETHODCALLTYPE buffer_SetPriority(IWineD3DBuffer *iface, DWORD priority) { - return resource_set_priority((IWineD3DResource *)iface, priority); + return resource_set_priority((IWineD3DResourceImpl *)iface, priority); } static DWORD STDMETHODCALLTYPE buffer_GetPriority(IWineD3DBuffer *iface) diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index ef142a2ea9..40784bac4a 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -229,8 +229,9 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_FreePrivateData(IWineD3DCubeTextur return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); } -static DWORD WINAPI IWineD3DCubeTextureImpl_SetPriority(IWineD3DCubeTexture *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); +static DWORD WINAPI IWineD3DCubeTextureImpl_SetPriority(IWineD3DCubeTexture *iface, DWORD priority) +{ + return resource_set_priority((IWineD3DResourceImpl *)iface, priority); } static DWORD WINAPI IWineD3DCubeTextureImpl_GetPriority(IWineD3DCubeTexture *iface) diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 3d62de9eaf..f33ee37851 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -250,13 +250,12 @@ HRESULT resource_free_private_data(struct IWineD3DResourceImpl *resource, REFGUI return WINED3D_OK; } -DWORD resource_set_priority(IWineD3DResource *iface, DWORD PriorityNew) +DWORD resource_set_priority(struct IWineD3DResourceImpl *resource, DWORD priority) { - IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface; - DWORD PriorityOld = This->resource.priority; - This->resource.priority = PriorityNew; - TRACE("(%p) : new priority %d, returning old priority %d\n", This, PriorityNew, PriorityOld ); - return PriorityOld; + DWORD prev = resource->resource.priority; + resource->resource.priority = priority; + TRACE("resource %p, new priority %u, returning old priority %u.\n", resource, priority, prev); + return prev; } DWORD resource_get_priority(struct IWineD3DResourceImpl *resource) diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 8035076bbe..1ce099cd7d 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -128,8 +128,9 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, R return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); } -DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); +DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD priority) +{ + return resource_set_priority((IWineD3DResourceImpl *)iface, priority); } DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 821db956e6..8b42d17e8d 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -254,8 +254,9 @@ static HRESULT WINAPI IWineD3DTextureImpl_FreePrivateData(IWineD3DTexture *iface return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); } -static DWORD WINAPI IWineD3DTextureImpl_SetPriority(IWineD3DTexture *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); +static DWORD WINAPI IWineD3DTextureImpl_SetPriority(IWineD3DTexture *iface, DWORD priority) +{ + return resource_set_priority((IWineD3DResourceImpl *)iface, priority); } static DWORD WINAPI IWineD3DTextureImpl_GetPriority(IWineD3DTexture *iface) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index f74a577ae9..b6def080fe 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -167,8 +167,9 @@ static HRESULT WINAPI IWineD3DVolumeImpl_FreePrivateData(IWineD3DVolume *iface, return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); } -static DWORD WINAPI IWineD3DVolumeImpl_SetPriority(IWineD3DVolume *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); +static DWORD WINAPI IWineD3DVolumeImpl_SetPriority(IWineD3DVolume *iface, DWORD priority) +{ + return resource_set_priority((IWineD3DResourceImpl *)iface, priority); } static DWORD WINAPI IWineD3DVolumeImpl_GetPriority(IWineD3DVolume *iface) diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 5807d3fd6f..9a4fd40ff9 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -174,8 +174,9 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTe return resource_free_private_data((IWineD3DResourceImpl *)iface, refguid); } -static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD PriorityNew) { - return resource_set_priority((IWineD3DResource *)iface, PriorityNew); +static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD priority) +{ + return resource_set_priority((IWineD3DResourceImpl *)iface, priority); } static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DVolumeTexture *iface) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2e50f7a30e..dbfd4e33de 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1837,7 +1837,7 @@ HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct wined3d_format *format, WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN; -DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority) DECLSPEC_HIDDEN; +DWORD resource_set_priority(struct IWineD3DResourceImpl *resource, DWORD priority) DECLSPEC_HIDDEN; HRESULT resource_set_private_data(struct IWineD3DResourceImpl *resource, REFGUID guid, const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN; void resource_unload(IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;