Commit 31bf03d8 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Only recreate GL contexts when we're using GL for rendering in wined3d_device_reset().

parent df446ae4
......@@ -5604,7 +5604,8 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
}
delete_opengl_contexts(device, swapchain);
if (device->d3d_initialized)
delete_opengl_contexts(device, swapchain);
if (!swapchain_desc->windowed != !swapchain->desc.windowed
|| DisplayModeChanged)
......@@ -5678,7 +5679,8 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
swapchain_update_render_to_fbo(swapchain);
swapchain_update_draw_bindings(swapchain);
hr = create_primary_opengl_context(device, swapchain);
if (device->d3d_initialized)
hr = create_primary_opengl_context(device, swapchain);
wined3d_swapchain_decref(swapchain);
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
......
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