From fe6ec7acfc4cd6635f3fe9501074025dbdcef525 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 30 Nov 2013 20:15:48 +0000 Subject: [PATCH] Workaround for mingw. --- .../VST/juce_VST_Wrapper.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 3f0012ff20..678d3396c4 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -40,13 +40,6 @@ #undef STRICT #define STRICT 1 #include - - #ifdef __MINGW32__ - struct MOUSEHOOKSTRUCTEX : public MOUSEHOOKSTRUCT - { - DWORD mouseData; - }; - #endif #elif defined (LINUX) #include #include @@ -181,7 +174,10 @@ namespace { if (nCode >= 0 && wParam == WM_MOUSEWHEEL) { - const MOUSEHOOKSTRUCTEX& hs = *(MOUSEHOOKSTRUCTEX*) lParam; + // using a local copy of this struct to support old mingw libraries + struct MOUSEHOOKSTRUCTEX_ : public MOUSEHOOKSTRUCT { DWORD mouseData; }; + + const MOUSEHOOKSTRUCTEX_& hs = *(MOUSEHOOKSTRUCTEX_*) lParam; if (Component* const comp = Desktop::getInstance().findComponentAt (Point (hs.pt.x, hs.pt.y))) if (comp->getWindowHandle() != 0)