[MPlayer-cvslog] r33445 - trunk/gui/win32/interface.c

ib subversion at mplayerhq.hu
Sun May 8 15:47:19 CEST 2011


Author: ib
Date: Sun May  8 15:47:19 2011
New Revision: 33445

Log:
Don't use CreateThread() unconditionally.

CreateThread() is only needed for Cygwin,
otherwise _beginthreadex() is preferable.

This revises r33390.

Modified:
   trunk/gui/win32/interface.c

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Sun May  8 15:34:32 2011	(r33444)
+++ trunk/gui/win32/interface.c	Sun May  8 15:47:19 2011	(r33445)
@@ -22,6 +22,13 @@
  */
 
 #include <windows.h>
+
+#if defined(__CYGWIN__)
+#define _beginthreadex CreateThread
+#else
+#include <process.h>
+#endif
+
 #include "path.h"
 #include "gui/interface.h"
 #include "m_option.h"
@@ -493,7 +500,7 @@ void guiInit(void)
     /* 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);
     }
 


More information about the MPlayer-cvslog mailing list