changeset 1628:2571d6b23065

_init_thread() needs to be called after initializing GDI+ on Windows. Was hoping this is why GDI+ drawing wasn't working, but sadly no.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 28 Mar 2012 16:03:20 +0000
parents b41ecd439b47
children d97e3f7f4e47
files win/dw.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Wed Mar 28 02:47:55 2012 +0000
+++ b/win/dw.c	Wed Mar 28 16:03:20 2012 +0000
@@ -3864,7 +3864,6 @@
 #ifdef GDIPLUS
    _gpPen = TlsAlloc();
 #endif   
-   _init_thread();
 
    icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
    icc.dwICC = ICC_WIN95_CLASSES|ICC_DATE_CLASSES;
@@ -4013,6 +4012,9 @@
    si.SuppressExternalCodecs = FALSE;
    GdiplusStartup(&gdiplusToken, &si, NULL);
 #endif
+   
+   /* GDI+ Needs to be initialized before calling _init_thread(); */
+   _init_thread();
 
 #ifdef AEROGLASS
    /* Attempt to load the Desktop Window Manager and Theme library */