# HG changeset patch # User ib # Date 1304862439 0 # Node ID c9c9f015619bc9148939c545780223ad19562680 # Parent 5a5c875e7392c5ad8a30c872372bc9468c501395 Don't use CreateThread() unconditionally. CreateThread() is only needed for Cygwin, otherwise _beginthreadex() is preferable. This revises r33390. diff -r 5a5c875e7392 -r c9c9f015619b gui/win32/interface.c --- a/gui/win32/interface.c Sun May 08 13:34:32 2011 +0000 +++ b/gui/win32/interface.c Sun May 08 13:47:19 2011 +0000 @@ -22,6 +22,13 @@ */ #include + +#if defined(__CYGWIN__) +#define _beginthreadex CreateThread +#else +#include +#endif + #include "path.h" #include "gui/interface.h" #include "m_option.h" @@ -493,7 +500,7 @@ /* Create The gui thread */ if (!mygui) { - hThread = CreateThread(NULL, 0, GuiThread, NULL, 0, &threadId); + hThread = _beginthreadex(NULL, 0, GuiThread, NULL, 0, &threadId); mp_msg(MSGT_GPLAYER, MSGL_V, "[GUI] Creating GUI Thread 0x%04x\n", threadId); }