wined3d: Get rid of wined3d_device_uninit_gdi().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b599e8e3a0
commit
15d52fec68
|
@ -400,7 +400,7 @@ static void ddraw_destroy_swapchain(struct ddraw *ddraw)
|
|||
}
|
||||
else
|
||||
{
|
||||
wined3d_device_uninit_gdi(ddraw->wined3d_device);
|
||||
wined3d_device_uninit_3d(ddraw->wined3d_device);
|
||||
}
|
||||
|
||||
ddraw_set_swapchain_window(ddraw, NULL);
|
||||
|
|
|
@ -1174,11 +1174,12 @@ static void device_free_sampler(struct wine_rb_entry *entry, void *context)
|
|||
|
||||
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
{
|
||||
BOOL no3d = device->wined3d->flags & WINED3D_NO3D;
|
||||
unsigned int i;
|
||||
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
if (!device->d3d_initialized)
|
||||
if (!device->d3d_initialized && !no3d)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
|
@ -1192,7 +1193,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
|||
|
||||
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
|
||||
wined3d_device_delete_opengl_contexts(device);
|
||||
if (no3d)
|
||||
device->blitter->ops->blitter_destroy(device->blitter, NULL);
|
||||
else
|
||||
wined3d_device_delete_opengl_contexts(device);
|
||||
|
||||
if (device->fb.depth_stencil)
|
||||
{
|
||||
|
@ -1239,25 +1243,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
|||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_uninit_gdi(struct wined3d_device *device)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
device->blitter->ops->blitter_destroy(device->blitter, NULL);
|
||||
|
||||
for (i = 0; i < device->swapchain_count; ++i)
|
||||
{
|
||||
TRACE("Releasing the implicit swapchain %u.\n", i);
|
||||
if (wined3d_swapchain_decref(device->swapchains[i]))
|
||||
FIXME("Something's still holding the implicit swapchain.\n");
|
||||
}
|
||||
|
||||
heap_free(device->swapchains);
|
||||
device->swapchains = NULL;
|
||||
device->swapchain_count = 0;
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
/* Enables thread safety in the wined3d device and its resources. Called by DirectDraw
|
||||
* from SetCooperativeLevel if DDSCL_MULTITHREADED is specified, and by d3d8/9 from
|
||||
* CreateDevice if D3DCREATE_MULTITHREADED is passed.
|
||||
|
|
|
@ -189,7 +189,6 @@
|
|||
@ cdecl wined3d_device_setup_fullscreen_window(ptr ptr long long)
|
||||
@ cdecl wined3d_device_show_cursor(ptr long)
|
||||
@ cdecl wined3d_device_uninit_3d(ptr)
|
||||
@ cdecl wined3d_device_uninit_gdi(ptr)
|
||||
@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long long)
|
||||
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
|
||||
@ cdecl wined3d_device_validate_device(ptr ptr)
|
||||
|
|
|
@ -2481,7 +2481,6 @@ void __cdecl wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT i
|
|||
void __cdecl wined3d_device_setup_fullscreen_window(struct wined3d_device *device, HWND window, UINT w, UINT h);
|
||||
BOOL __cdecl wined3d_device_show_cursor(struct wined3d_device *device, BOOL show);
|
||||
HRESULT __cdecl wined3d_device_uninit_3d(struct wined3d_device *device);
|
||||
HRESULT __cdecl wined3d_device_uninit_gdi(struct wined3d_device *device);
|
||||
void __cdecl wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
|
||||
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
|
||||
unsigned int depth_pitch, unsigned int flags);
|
||||
|
|
Loading…
Reference in New Issue