mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Workaround for OSX tiled image rendering bug. Mingw atomics fix. Fix for compiling atomics on 10.4. Added a 'new folder' button to the directory chooser on Mac.
This commit is contained in:
parent
5153493b46
commit
91eeebda2f
7 changed files with 40 additions and 17 deletions
|
|
@ -56,14 +56,14 @@ public:
|
|||
//==============================================================================
|
||||
#if (JUCE_MAC || JUCE_IPHONE) // Mac and iPhone...
|
||||
|
||||
inline void Atomic::increment (int32& variable) { OSAtomicIncrement32 ((volatile int32_t*) &variable); }
|
||||
inline int32 Atomic::incrementAndReturn (int32& variable) { return OSAtomicIncrement32 ((volatile int32_t*) &variable); }
|
||||
inline void Atomic::decrement (int32& variable) { OSAtomicDecrement32 ((volatile int32_t*) &variable); }
|
||||
inline int32 Atomic::decrementAndReturn (int32& variable) { return OSAtomicDecrement32 ((volatile int32_t*) &variable); }
|
||||
inline void Atomic::increment (int32& variable) { OSAtomicIncrement32 ((int32_t*) &variable); }
|
||||
inline int32 Atomic::incrementAndReturn (int32& variable) { return OSAtomicIncrement32 ((int32_t*) &variable); }
|
||||
inline void Atomic::decrement (int32& variable) { OSAtomicDecrement32 ((int32_t*) &variable); }
|
||||
inline int32 Atomic::decrementAndReturn (int32& variable) { return OSAtomicDecrement32 ((int32_t*) &variable); }
|
||||
inline int32 Atomic::compareAndExchange (int32& destination, int32 newValue, int32 oldValue)
|
||||
{ return OSAtomicCompareAndSwap32Barrier (oldValue, newValue, (volatile int32_t*) &destination); }
|
||||
{ return OSAtomicCompareAndSwap32Barrier (oldValue, newValue, (int32_t*) &destination); }
|
||||
|
||||
#elif JUCE_GCC // Linux...
|
||||
#elif JUCE_LINUX // Linux...
|
||||
|
||||
//==============================================================================
|
||||
inline void Atomic::increment (int32& variable) { __sync_add_and_fetch (&variable, 1); }
|
||||
|
|
|
|||
|
|
@ -402,7 +402,9 @@ public:
|
|||
CGContextDrawTiledImage (context, imageRect, image);
|
||||
#else
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
||||
if (CGContextDrawTiledImage != 0)
|
||||
// There's a bug in CGContextDrawTiledImage that makes it incredibly slow
|
||||
// if it's doing a transformation - it's quicker to just draw lots of images manually
|
||||
if (CGContextDrawTiledImage != 0 && transform.isOnlyTranslation())
|
||||
CGContextDrawTiledImage (context, imageRect, image);
|
||||
else
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ void FileChooser::showPlatformDialog (Array<File>& results,
|
|||
|
||||
[panel setDelegate: delegate];
|
||||
|
||||
if (isSaveDialogue || selectsDirectory)
|
||||
[panel setCanCreateDirectories: YES];
|
||||
|
||||
String directory, filename;
|
||||
|
||||
if (currentFileOrDirectory.isDirectory())
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
#if ! (JUCE_USE_INTRINSICS || JUCE_GCC)
|
||||
#if ! JUCE_USE_INTRINSICS
|
||||
// In newer compilers, the inline versions of these are used (in juce_Atomic.h), but in
|
||||
// older ones we have to actually call the ops as win32 functions..
|
||||
void Atomic::increment (int32& variable) { InterlockedIncrement (reinterpret_cast <volatile long*> (&variable)); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue