Commit 35b23262 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Set "device->d3d_initialized" in wined3d_device_set_implicit_swapchain().

parent f06f28cf
...@@ -4618,8 +4618,6 @@ static HRESULT adapter_gl_init_3d(struct wined3d_device *device) ...@@ -4618,8 +4618,6 @@ static HRESULT adapter_gl_init_3d(struct wined3d_device *device)
if (!wined3d_swapchain_gl(device->swapchains[0])->context_count) if (!wined3d_swapchain_gl(device->swapchains[0])->context_count)
return E_FAIL; return E_FAIL;
device->d3d_initialized = TRUE;
return WINED3D_OK; return WINED3D_OK;
} }
......
...@@ -1099,6 +1099,7 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, str ...@@ -1099,6 +1099,7 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, str
memset(device->state.fb.render_targets, 0, sizeof(device->state.fb.render_targets)); memset(device->state.fb.render_targets, 0, sizeof(device->state.fb.render_targets));
if (FAILED(hr = device->adapter->adapter_ops->adapter_init_3d(device))) if (FAILED(hr = device->adapter->adapter_ops->adapter_init_3d(device)))
goto err_out; goto err_out;
device->d3d_initialized = TRUE;
device_init_swapchain_state(device, swapchain); device_init_swapchain_state(device, swapchain);
...@@ -1153,7 +1154,6 @@ static void device_free_blend_state(struct wine_rb_entry *entry, void *context) ...@@ -1153,7 +1154,6 @@ static void device_free_blend_state(struct wine_rb_entry *entry, void *context)
void wined3d_device_uninit_3d(struct wined3d_device *device) void wined3d_device_uninit_3d(struct wined3d_device *device)
{ {
BOOL no3d = device->wined3d->flags & WINED3D_NO3D;
struct wined3d_resource *resource, *cursor; struct wined3d_resource *resource, *cursor;
struct wined3d_rendertarget_view *view; struct wined3d_rendertarget_view *view;
struct wined3d_texture *texture; struct wined3d_texture *texture;
...@@ -1161,7 +1161,7 @@ void wined3d_device_uninit_3d(struct wined3d_device *device) ...@@ -1161,7 +1161,7 @@ void wined3d_device_uninit_3d(struct wined3d_device *device)
TRACE("device %p.\n", device); TRACE("device %p.\n", device);
if (!device->d3d_initialized && !no3d) if (!device->d3d_initialized)
{ {
ERR("Called while 3D support was not initialised.\n"); ERR("Called while 3D support was not initialised.\n");
return; return;
......
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