From 2451b3762c131e1a9efbec09291b1bf7a041637f Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 28 Mar 2013 14:24:28 +0000 Subject: [PATCH] Some mingw compatibility tweaks. --- modules/juce_core/juce_core.cpp | 9 ++++++--- modules/juce_core/native/juce_win32_Threads.cpp | 2 +- modules/juce_core/system/juce_SystemStats.cpp | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/juce_core/juce_core.cpp b/modules/juce_core/juce_core.cpp index ea54142c1a..bf01ab4d93 100644 --- a/modules/juce_core/juce_core.cpp +++ b/modules/juce_core/juce_core.cpp @@ -52,10 +52,13 @@ #include #include #include - #include - #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES - #pragma comment (lib, "DbgHelp.lib") + #if ! JUCE_MINGW + #include + + #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES + #pragma comment (lib, "DbgHelp.lib") + #endif #endif #if JUCE_MINGW diff --git a/modules/juce_core/native/juce_win32_Threads.cpp b/modules/juce_core/native/juce_win32_Threads.cpp index b196ca20a2..be99a12803 100644 --- a/modules/juce_core/native/juce_win32_Threads.cpp +++ b/modules/juce_core/native/juce_win32_Threads.cpp @@ -608,7 +608,7 @@ struct HighResolutionTimer::Pimpl const int actualPeriod = jlimit ((int) tc.wPeriodMin, (int) tc.wPeriodMax, newPeriod); timerID = timeSetEvent (actualPeriod, tc.wPeriodMin, callbackFunction, (DWORD_PTR) this, - TIME_PERIODIC | TIME_CALLBACK_FUNCTION | TIME_KILL_SYNCHRONOUS); + TIME_PERIODIC | TIME_CALLBACK_FUNCTION | 0x100 /*TIME_KILL_SYNCHRONOUS*/); } } } diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp index 3ca36d6256..0f3f012b1f 100644 --- a/modules/juce_core/system/juce_SystemStats.cpp +++ b/modules/juce_core/system/juce_SystemStats.cpp @@ -70,7 +70,7 @@ String SystemStats::getStackBacktrace() { String result; - #if JUCE_ANDROID + #if JUCE_ANDROID || JUCE_MINGW jassertfalse; // sorry, not implemented yet! #elif JUCE_WINDOWS