|  | @@ -525,6 +525,7 @@ static constexpr const fileRequestFunc nullFileRequestFunc = nullptr; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | // UI/editor implementation |  |  | // UI/editor implementation | 
														
													
														
															
																|  |  | class CardinalWrapperEditor : public juce::AudioProcessorEditor, |  |  | class CardinalWrapperEditor : public juce::AudioProcessorEditor, | 
														
													
														
															
																|  |  |  |  |  | private juce::AsyncUpdater, | 
														
													
														
															
																|  |  | private juce::Timer |  |  | private juce::Timer | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
														
															
																|  |  | CardinalWrapperProcessor& cardinalProcessor; |  |  | CardinalWrapperProcessor& cardinalProcessor; | 
														
													
												
													
														
															
																|  | @@ -554,6 +555,22 @@ public: | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | protected: |  |  | protected: | 
														
													
														
															
																|  |  |  |  |  | void handleAsyncUpdate() override | 
														
													
														
															
																|  |  |  |  |  | { | 
														
													
														
															
																|  |  |  |  |  | DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | int width = static_cast<int>(ui->getWidth()); | 
														
													
														
															
																|  |  |  |  |  | int height = static_cast<int>(ui->getHeight()); | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | #ifdef DISTRHO_OS_MAC | 
														
													
														
															
																|  |  |  |  |  | const double scaleFactor = ui->getScaleFactor(); | 
														
													
														
															
																|  |  |  |  |  | width /= scaleFactor; | 
														
													
														
															
																|  |  |  |  |  | height /= scaleFactor; | 
														
													
														
															
																|  |  |  |  |  | #endif | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  |  |  |  | setSize(width, height); | 
														
													
														
															
																|  |  |  |  |  | } | 
														
													
														
															
																|  |  |  |  |  | 
 | 
														
													
														
															
																|  |  | void timerCallback() override |  |  | void timerCallback() override | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
														
															
																|  |  | if (ui == nullptr) |  |  | if (ui == nullptr) | 
														
													
												
													
														
															
																|  | @@ -639,21 +656,12 @@ private: | 
														
													
														
															
																|  |  | cardinalProcessor.plugin.setState(key, value); |  |  | cardinalProcessor.plugin.setState(key, value); | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | static void setSizeFunc(void* const ptr, uint width, uint height) |  |  |  | 
														
													
														
															
																|  |  |  |  |  | static void setSizeFunc(void* const ptr, uint, uint) | 
														
													
														
															
																|  |  | { |  |  | { | 
														
													
														
															
																|  |  | CardinalWrapperEditor* const editor = static_cast<CardinalWrapperEditor*>(ptr); |  |  | CardinalWrapperEditor* const editor = static_cast<CardinalWrapperEditor*>(ptr); | 
														
													
														
															
																|  |  | DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); |  |  | DISTRHO_SAFE_ASSERT_RETURN(editor != nullptr,); | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
														
															
																|  |  | #ifdef DISTRHO_OS_MAC |  |  |  | 
														
													
														
															
																|  |  | UIExporter* const ui = editor->ui; |  |  |  | 
														
													
														
															
																|  |  | DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,); |  |  |  | 
														
													
														
															
																|  |  | 
 |  |  |  | 
														
													
														
															
																|  |  | const double scaleFactor = ui->getScaleFactor(); |  |  |  | 
														
													
														
															
																|  |  | width /= scaleFactor; |  |  |  | 
														
													
														
															
																|  |  | height /= scaleFactor; |  |  |  | 
														
													
														
															
																|  |  | #endif |  |  |  | 
														
													
														
															
																|  |  | 
 |  |  |  | 
														
													
														
															
																|  |  | editor->setSize(static_cast<int>(width), static_cast<int>(height)); |  |  |  | 
														
													
														
															
																|  |  |  |  |  | editor->triggerAsyncUpdate(); | 
														
													
														
															
																|  |  | } |  |  | } | 
														
													
														
															
																|  |  | }; |  |  | }; | 
														
													
														
															
																|  |  | 
 |  |  | 
 | 
														
													
												
													
														
															
																|  | 
 |