Browse Source

Workarounds for some mingw build problems.

tags/2021-05-28
jules 11 years ago
parent
commit
dfda7c77fc
5 changed files with 14 additions and 8 deletions
  1. +4
    -0
      modules/juce_audio_basics/juce_audio_basics.cpp
  2. +1
    -0
      modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp
  3. +2
    -1
      modules/juce_graphics/native/juce_win32_Fonts.cpp
  4. +2
    -2
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp
  5. +5
    -5
      modules/juce_opengl/opengl/juce_Matrix3D.h

+ 4
- 0
modules/juce_audio_basics/juce_audio_basics.cpp View File

@@ -36,6 +36,10 @@
#include "AppConfig.h"
#include "juce_audio_basics.h"
#if JUCE_MINGW && ! defined (__SSE2__)
#define JUCE_USE_SSE_INTRINSICS 0
#endif
#ifndef JUCE_USE_SSE_INTRINSICS
#define JUCE_USE_SSE_INTRINSICS 1
#endif


+ 1
- 0
modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp View File

@@ -61,6 +61,7 @@ namespace FlacNamespace
#define FLAC__HAS_X86INTRIN 1
#endif
#undef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#define flac_max jmax
#define flac_min jmin


+ 2
- 1
modules/juce_graphics/native/juce_win32_Fonts.cpp View File

@@ -120,7 +120,8 @@ namespace TTFNameExtractor
for (int i = 0; i < (int) ByteOrder::swapIfLittleEndian (offsetTable.numTables); ++i)
{
TableDirectory tableDirectory = { 0 };
TableDirectory tableDirectory;
zerostruct (tableDirectory);
input.read (&tableDirectory, sizeof (tableDirectory));
if (String (tableDirectory.tag, sizeof (tableDirectory.tag)).equalsIgnoreCase ("name"))


+ 2
- 2
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -3229,11 +3229,11 @@ void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDis
struct MonitorInfo
{
MonitorInfo (Rectangle<int> rect, bool main, double d) noexcept
: isMain (main), bounds (rect), dpi (d) {}
: bounds (rect), dpi (d), isMain (main) {}
Rectangle<int> bounds;
bool isMain;
double dpi;
bool isMain;
};
static BOOL CALLBACK enumMonitorsProc (HMONITOR hm, HDC, LPRECT r, LPARAM userInfo)


+ 5
- 5
modules/juce_opengl/opengl/juce_Matrix3D.h View File

@@ -94,12 +94,12 @@ public:
}
/** Returns a new matrix from the given frustrum values. */
static Matrix3D fromFrustum (Type left, Type right, Type bottom, Type top, Type near, Type far) noexcept
static Matrix3D fromFrustum (Type left, Type right, Type bottom, Type top, Type nearDistance, Type farDistance) noexcept
{
return Matrix3D ((2.0f * near) / (right - left), 0.0f, 0.0f, 0.0f,
0.0f, (2.0f * near) / (top - bottom), 0.0f, 0.0f,
(right + left) / (right - left), (top + bottom) / (top - bottom), -(far + near) / (far - near), -1.0f,
0.0f, 0.0f, -(2.0f * far * near) / (far - near), 0.0f);
return Matrix3D ((2.0f * nearDistance) / (right - left), 0.0f, 0.0f, 0.0f,
0.0f, (2.0f * nearDistance) / (top - bottom), 0.0f, 0.0f,
(right + left) / (right - left), (top + bottom) / (top - bottom), -(farDistance + nearDistance) / (farDistance - nearDistance), -1.0f,
0.0f, 0.0f, -(2.0f * farDistance * nearDistance) / (farDistance - nearDistance), 0.0f);
}
/** Multiplies this matrix by another. */


Loading…
Cancel
Save