Browse Source

Fixes for mingw

tags/1.9.8
falkTX 7 years ago
parent
commit
f0f0198932
5 changed files with 27 additions and 4 deletions
  1. +1
    -1
      source/modules/juce_audio_basics/juce_audio_basics.cpp
  2. +2
    -1
      source/modules/juce_audio_processors/format_types/juce_VST3Headers.h
  3. +2
    -2
      source/modules/juce_events/native/juce_win32_Messaging.cpp
  4. +1
    -0
      source/modules/juce_gui_basics/juce_gui_basics.cpp
  5. +21
    -0
      source/modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 1
- 1
source/modules/juce_audio_basics/juce_audio_basics.cpp View File

@@ -31,7 +31,7 @@
#include "juce_audio_basics.h"
#if JUCE_MINGW && ! defined (__SSE2__)
#if JUCE_MINGW
#define JUCE_USE_SSE_INTRINSICS 0
#endif


+ 2
- 1
source/modules/juce_audio_processors/format_types/juce_VST3Headers.h View File

@@ -90,12 +90,13 @@
#define _set_abort_behavior(...)
#endif
#include <base/source/baseiids.cpp>
#include <base/source/fatomic.cpp>
#include <base/source/fbuffer.cpp>
#include <base/source/fdebug.cpp>
#include <base/source/fobject.cpp>
#include <base/source/fstreamer.cpp>
#include <base/source/fstring.cpp>
#include <base/source/flock.cpp>
#include <base/source/fthread.cpp>
#include <base/source/updatehandler.cpp>
#include <pluginterfaces/base/conststringtable.cpp>
#include <pluginterfaces/base/funknown.cpp>


+ 2
- 2
source/modules/juce_events/native/juce_win32_Messaging.cpp View File

@@ -104,7 +104,7 @@ namespace WindowsMessageHelpers
}
}
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
#if JUCE_MODULE_AVAILABLE_juce_gui_extra && ! JUCE_MINGW
LRESULT juce_offerEventToActiveXControl (::MSG&);
#endif
@@ -119,7 +119,7 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend
if (GetMessage (&m, (HWND) 0, 0, 0) >= 0)
{
#if JUCE_MODULE_AVAILABLE_juce_gui_extra
#if JUCE_MODULE_AVAILABLE_juce_gui_extra && ! JUCE_MINGW
if (juce_offerEventToActiveXControl (m) != S_FALSE)
return true;
#endif


+ 1
- 0
source/modules/juce_gui_basics/juce_gui_basics.cpp View File

@@ -83,6 +83,7 @@
#if JUCE_MINGW
#include <imm.h>
#define JUCE_DISABLE_WIN32_DPI_AWARENESS 1
#endif
//==============================================================================


+ 21
- 0
source/modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -206,6 +206,10 @@ extern void* getUser32Function (const char*);
};
#endif
#if JUCE_MINGW
static bool canUseMultiTouch() { return false; }
static void checkForPointerAPI() { }
#else
typedef BOOL (WINAPI* RegisterTouchWindowFunc) (HWND, ULONG);
typedef BOOL (WINAPI* GetTouchInputInfoFunc) (HTOUCHINPUT, UINT, TOUCHINPUT*, int);
typedef BOOL (WINAPI* CloseTouchInputHandleFunc) (HTOUCHINPUT);
@@ -259,6 +263,7 @@ static void checkForPointerAPI()
&& getPointerTouchInfo != nullptr
&& getPointerPenInfo != nullptr);
}
#endif
static Rectangle<int> rectangleFromRECT (const RECT& r) noexcept
{
@@ -1578,7 +1583,9 @@ private:
case WM_MOUSEACTIVATE:
case WM_NCMOUSEHOVER:
case WM_MOUSEHOVER:
#if ! JUCE_MINGW
case WM_TOUCH:
#endif
case WM_POINTERUPDATE:
case WM_NCPOINTERUPDATE:
case WM_POINTERWHEEL:
@@ -1694,8 +1701,10 @@ private:
RegisterDragDrop (hwnd, dropTarget);
#if ! JUCE_MINGW
if (canUseMultiTouch())
registerTouchWindow (hwnd, 0);
#endif
setDPIAwareness();
setMessageFilter();
@@ -2025,8 +2034,10 @@ private:
bool isTouchEvent() noexcept
{
#if ! JUCE_MINGW
if (registerTouchWindow == nullptr)
return false;
#endif
// Relevant info about touch/pen detection flags:
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms703320(v=vs.85).aspx
@@ -2194,6 +2205,7 @@ private:
static MouseInputSource::InputSourceType getPointerType (WPARAM wParam)
{
#if ! JUCE_MINGW
if (getPointerTypeFunction != nullptr)
{
POINTER_INPUT_TYPE pointerType;
@@ -2207,6 +2219,7 @@ private:
return MouseInputSource::InputSourceType::pen;
}
}
#endif
return MouseInputSource::InputSourceType::mouse;
}
@@ -2228,6 +2241,7 @@ private:
peer->handleMouseWheel (getPointerType (wParam), localPos, getMouseEventTime(), wheel);
}
#if ! JUCE_MINGW
bool doGestureEvent (LPARAM lParam)
{
GESTUREINFO gi;
@@ -2403,6 +2417,7 @@ private:
return touchInput;
}
#endif
bool handlePenInput (POINTER_PEN_INFO penInfo, Point<float> pos, const float pressure, bool isDown, bool isUp)
{
@@ -2945,6 +2960,7 @@ private:
return 1;
#if ! JUCE_MINGW
//==============================================================================
case WM_POINTERUPDATE:
if (handlePointerInput (wParam, lParam, false, false))
@@ -2960,6 +2976,7 @@ private:
if (handlePointerInput (wParam, lParam, false, true))
return 0;
break;
#endif
//==============================================================================
case WM_MOUSEMOVE: doMouseMove (getPointFromLParam (lParam), false); return 0;
@@ -2990,6 +3007,7 @@ private:
return 0;
#if ! JUCE_MINGW
case WM_TOUCH:
if (getTouchInputInfo != nullptr)
return doTouchEvent ((int) wParam, (HTOUCHINPUT) lParam);
@@ -3001,6 +3019,7 @@ private:
return 0;
break;
#endif
//==============================================================================
case WM_SIZING: return handleSizeConstraining (*(RECT*) lParam, wParam);
@@ -3898,6 +3917,7 @@ static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userIn
const bool isMain = (info.dwFlags & 1 /* MONITORINFOF_PRIMARY */) != 0;
double dpi = 0;
#if ! JUCE_DISABLE_WIN32_DPI_AWARENESS
if (getDPIForMonitor != nullptr)
{
UINT dpiX = 0, dpiY = 0;
@@ -3905,6 +3925,7 @@ static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userIn
if (SUCCEEDED (getDPIForMonitor (hm, MDT_Default, &dpiX, &dpiY)))
dpi = (dpiX + dpiY) / 2.0;
}
#endif
((Array<MonitorInfo>*) userInfo)->add (MonitorInfo (rectangleFromRECT (*r), isMain, dpi));


Loading…
Cancel
Save