Commit efcb7344 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Set the window state thread description only if it's actually a new thread.

Fixes: a2c03e23
parent 6a4d688f
......@@ -2200,8 +2200,6 @@ static DWORD WINAPI set_window_state_thread(void *ctx)
struct wined3d_window_state *s = ctx;
bool filter;
SetThreadDescription(GetCurrentThread(), L"wined3d_set_window_state");
filter = wined3d_filter_messages(s->window, TRUE);
if (s->set_style)
......@@ -2229,11 +2227,18 @@ static void set_window_state(struct wined3d_window_state *s)
* position can potentially deadlock if that thread isn't processing
* messages. */
if (window_tid == tid)
{
set_window_state_thread(s);
else if (!(thread = CreateThread(NULL, 0, set_window_state_thread, s, 0, NULL)))
ERR("Failed to create thread.\n");
else
}
else if ((thread = CreateThread(NULL, 0, set_window_state_thread, s, 0, NULL)))
{
SetThreadDescription(thread, L"wined3d_set_window_state");
CloseHandle(thread);
}
else
{
ERR("Failed to create thread.\n");
}
}
HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state,
......
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