| @@ -633,7 +633,7 @@ | |||||
| #include <dshowasf.h> | #include <dshowasf.h> | ||||
| #endif | #endif | ||||
| #if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE | |||||
| #if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE | |||||
| #include <evr.h> | #include <evr.h> | ||||
| #endif | #endif | ||||
| @@ -88166,11 +88166,17 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (Rectangle<int> (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()).getIntersection (image.getBounds()))); | |||||
| c = clip->applyClipTo (c); | |||||
| Rectangle<int> area (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()); | |||||
| area = area.getIntersection (image.getBounds()); | |||||
| if (c != nullptr) | |||||
| c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false); | |||||
| if (! area.isEmpty()) | |||||
| { | |||||
| SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (area)); | |||||
| c = clip->applyClipTo (c); | |||||
| if (c != nullptr) | |||||
| c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false); | |||||
| } | |||||
| } | } | ||||
| return; | return; | ||||
| @@ -252879,7 +252885,7 @@ void QuickTimeMovieComponent::setBoundsWithCorrectAspectRatio (const Rectangle<i | |||||
| /*** Start of inlined file: juce_win32_DirectShowComponent.cpp ***/ | /*** Start of inlined file: juce_win32_DirectShowComponent.cpp ***/ | ||||
| #if JUCE_INCLUDED_FILE | |||||
| #if JUCE_INCLUDED_FILE && JUCE_DIRECTSHOW | |||||
| namespace DirectShowHelpers | namespace DirectShowHelpers | ||||
| { | { | ||||
| @@ -283463,10 +283469,16 @@ public: | |||||
| commandManager->invoke (info, true); | commandManager->invoke (info, true); | ||||
| } | } | ||||
| currentModel->menuItemSelected (commandId, topLevelIndex); | |||||
| (new AsyncCommandInvoker (commandId, topLevelIndex))->post(); | |||||
| } | } | ||||
| } | } | ||||
| void invokeDirectly (const int commandId, const int topLevelIndex) | |||||
| { | |||||
| if (currentModel != nullptr) | |||||
| currentModel->menuItemSelected (commandId, topLevelIndex); | |||||
| } | |||||
| void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo, | void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo, | ||||
| const int topLevelMenuId, const int topLevelIndex) | const int topLevelMenuId, const int topLevelIndex) | ||||
| { | { | ||||
| @@ -283649,6 +283661,25 @@ private: | |||||
| private: | private: | ||||
| JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater); | JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater); | ||||
| }; | }; | ||||
| class AsyncCommandInvoker : public CallbackMessage | |||||
| { | |||||
| public: | |||||
| AsyncCommandInvoker (const int commandId_, const int topLevelIndex_) | |||||
| : commandId (commandId_), topLevelIndex (topLevelIndex_) | |||||
| {} | |||||
| void messageCallback() | |||||
| { | |||||
| if (JuceMainMenuHandler::instance != nullptr) | |||||
| JuceMainMenuHandler::instance->invokeDirectly (commandId, topLevelIndex); | |||||
| } | |||||
| private: | |||||
| const int commandId, topLevelIndex; | |||||
| JUCE_DECLARE_NON_COPYABLE (AsyncCommandInvoker); | |||||
| }; | |||||
| }; | }; | ||||
| JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr; | JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr; | ||||
| @@ -73,7 +73,7 @@ namespace JuceDummyNamespace {} | |||||
| */ | */ | ||||
| #define JUCE_MAJOR_VERSION 1 | #define JUCE_MAJOR_VERSION 1 | ||||
| #define JUCE_MINOR_VERSION 53 | #define JUCE_MINOR_VERSION 53 | ||||
| #define JUCE_BUILDNUMBER 102 | |||||
| #define JUCE_BUILDNUMBER 103 | |||||
| /** Current Juce version number. | /** Current Juce version number. | ||||
| @@ -33,7 +33,7 @@ | |||||
| */ | */ | ||||
| #define JUCE_MAJOR_VERSION 1 | #define JUCE_MAJOR_VERSION 1 | ||||
| #define JUCE_MINOR_VERSION 53 | #define JUCE_MINOR_VERSION 53 | ||||
| #define JUCE_BUILDNUMBER 102 | |||||
| #define JUCE_BUILDNUMBER 103 | |||||
| /** Current Juce version number. | /** Current Juce version number. | ||||
| @@ -2144,11 +2144,17 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (Rectangle<int> (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()).getIntersection (image.getBounds()))); | |||||
| c = clip->applyClipTo (c); | |||||
| Rectangle<int> area (tx, ty, sourceImage.getWidth(), sourceImage.getHeight()); | |||||
| area = area.getIntersection (image.getBounds()); | |||||
| if (c != nullptr) | |||||
| c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false); | |||||
| if (! area.isEmpty()) | |||||
| { | |||||
| SoftwareRendererClasses::ClipRegionBase::Ptr c (new SoftwareRendererClasses::ClipRegion_EdgeTable (area)); | |||||
| c = clip->applyClipTo (c); | |||||
| if (c != nullptr) | |||||
| c->renderImageUntransformed (destData, srcData, alpha, tx, ty, false); | |||||
| } | |||||
| } | } | ||||
| return; | return; | ||||
| @@ -184,10 +184,16 @@ public: | |||||
| commandManager->invoke (info, true); | commandManager->invoke (info, true); | ||||
| } | } | ||||
| currentModel->menuItemSelected (commandId, topLevelIndex); | |||||
| (new AsyncCommandInvoker (commandId, topLevelIndex))->post(); | |||||
| } | } | ||||
| } | } | ||||
| void invokeDirectly (const int commandId, const int topLevelIndex) | |||||
| { | |||||
| if (currentModel != nullptr) | |||||
| currentModel->menuItemSelected (commandId, topLevelIndex); | |||||
| } | |||||
| void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo, | void addMenuItem (PopupMenu::MenuItemIterator& iter, NSMenu* menuToAddTo, | ||||
| const int topLevelMenuId, const int topLevelIndex) | const int topLevelMenuId, const int topLevelIndex) | ||||
| { | { | ||||
| @@ -370,6 +376,25 @@ private: | |||||
| private: | private: | ||||
| JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater); | JUCE_DECLARE_NON_COPYABLE (AsyncMenuUpdater); | ||||
| }; | }; | ||||
| class AsyncCommandInvoker : public CallbackMessage | |||||
| { | |||||
| public: | |||||
| AsyncCommandInvoker (const int commandId_, const int topLevelIndex_) | |||||
| : commandId (commandId_), topLevelIndex (topLevelIndex_) | |||||
| {} | |||||
| void messageCallback() | |||||
| { | |||||
| if (JuceMainMenuHandler::instance != nullptr) | |||||
| JuceMainMenuHandler::instance->invokeDirectly (commandId, topLevelIndex); | |||||
| } | |||||
| private: | |||||
| const int commandId, topLevelIndex; | |||||
| JUCE_DECLARE_NON_COPYABLE (AsyncCommandInvoker); | |||||
| }; | |||||
| }; | }; | ||||
| JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr; | JuceMainMenuHandler* JuceMainMenuHandler::instance = nullptr; | ||||
| @@ -23,7 +23,7 @@ | |||||
| ============================================================================== | ============================================================================== | ||||
| */ | */ | ||||
| #if JUCE_INCLUDED_FILE | |||||
| #if JUCE_INCLUDED_FILE && JUCE_DIRECTSHOW | |||||
| //====================================================================== | //====================================================================== | ||||
| @@ -150,7 +150,7 @@ | |||||
| #include <dshowasf.h> | #include <dshowasf.h> | ||||
| #endif | #endif | ||||
| #if JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE | |||||
| #if JUCE_DIRECTSHOW && JUCE_MEDIAFOUNDATION && JUCE_BUILD_NATIVE | |||||
| #include <evr.h> | #include <evr.h> | ||||
| #endif | #endif | ||||