wined3d: Pass an IWineD3DResourceImpl pointer to device_resource_add().
This commit is contained in:
parent
2ad540cea5
commit
852ac57db6
|
@ -6588,20 +6588,11 @@ static void WINAPI IWineD3DDeviceImpl_GetGammaRamp(IWineD3DDevice *iface, UINT i
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/** ********************************************************
|
||||
* Notification functions
|
||||
** ********************************************************/
|
||||
/** This function must be called in the release of a resource when ref == 0,
|
||||
* the contents of resource must still be correct,
|
||||
* any handles to other resource held by the caller must be closed
|
||||
* (e.g. a texture should release all held surfaces because telling the device that it's been released.)
|
||||
*****************************************************/
|
||||
void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource)
|
||||
void device_resource_add(struct IWineD3DDeviceImpl *device, struct IWineD3DResourceImpl *resource)
|
||||
{
|
||||
TRACE("(%p) : Adding resource %p\n", This, resource);
|
||||
TRACE("device %p, resource %p.\n", device, resource);
|
||||
|
||||
list_add_head(&This->resources, &((IWineD3DResourceImpl *) resource)->resource.resource_list_entry);
|
||||
list_add_head(&device->resources, &resource->resource.resource_list_entry);
|
||||
}
|
||||
|
||||
static void device_resource_remove(struct IWineD3DDeviceImpl *device, struct IWineD3DResourceImpl *resource)
|
||||
|
|
|
@ -88,7 +88,7 @@ HRESULT resource_init(struct IWineD3DResourceImpl *resource, WINED3DRESOURCETYPE
|
|||
WineD3DAdapterChangeGLRam(device, size);
|
||||
}
|
||||
|
||||
device_resource_add(device, (IWineD3DResource *)resource);
|
||||
device_resource_add(device, resource);
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ typedef struct IWineD3DDeviceImpl IWineD3DDeviceImpl;
|
|||
typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl;
|
||||
struct IWineD3DBaseShaderImpl;
|
||||
struct IWineD3DBaseTextureImpl;
|
||||
struct IWineD3DResourceImpl;
|
||||
|
||||
/* Texture format fixups */
|
||||
|
||||
|
@ -1782,7 +1783,7 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
|
|||
void device_preload_textures(IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
|
||||
LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, BOOL unicode,
|
||||
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
|
||||
void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_add(struct IWineD3DDeviceImpl *device, struct IWineD3DResourceImpl *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN;
|
||||
void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
|
||||
BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue