commit ff6393af86b4fd478a9c0fa048b4cc802c209dbf
parent 5a4c087b0411aaccf5dbbe74c757f0230c731f5e
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Tue, 23 Apr 2024 21:10:41 +0200
fix "function can be static" warning
Diffstat:
2 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/source/jucePluginEditorLib/pluginEditor.cpp b/source/jucePluginEditorLib/pluginEditor.cpp
@@ -79,7 +79,7 @@ namespace jucePluginEditorLib
}
#if !SYNTHLIB_DEMO_MODE
- bool Editor::savePresets(const FileType _type, const std::string& _pathName, const std::vector<std::vector<uint8_t>>& _presets) const
+ bool Editor::savePresets(const FileType _type, const std::string& _pathName, const std::vector<std::vector<uint8_t>>& _presets)
{
if (_presets.empty())
return false;
@@ -180,8 +180,31 @@ namespace jucePluginEditorLib
juce::NativeMessageBox::showAsync(options, [this](int)
{
m_processor.getConfig().setValue("disclaimerSeen", true);
+ onDisclaimerFinished();
});
}
+ else
+ {
+ onDisclaimerFinished();
+ }
+ }
+
+ void Editor::onDisclaimerFinished() const
+ {
+ if(!synthLib::isRunningUnderRosetta())
+ return;
+
+ const auto& name = m_processor.getProperties().name;
+
+ juce::NativeMessageBox::showMessageBoxAsync(juce::MessageBoxIconType::WarningIcon,
+ name + " - Rosetta detected",
+ name + " appears to be running in Rosetta mode.\n"
+ "\n"
+ "The DSP emulation core will perform much worse when being executed under Rosetta. We strongly recommend to run your DAW as a native Apple Silicon application",
+ nullptr, juce::ModalCallbackFunction::create([this](int)
+ {
+ m_processor.getConfig().setValue("disclaimerSeen", true);
+ }));
}
const char* Editor::getResourceByFilename(const std::string& _name, uint32_t& _dataSize)
diff --git a/source/jucePluginEditorLib/pluginEditor.h b/source/jucePluginEditorLib/pluginEditor.h
@@ -36,7 +36,7 @@ namespace jucePluginEditorLib
void loadPreset(const std::function<void(const juce::File&)>& _callback);
void savePreset(const std::function<void(const juce::File&)>& _callback);
#if !SYNTHLIB_DEMO_MODE
- bool savePresets(FileType _type, const std::string& _pathName, const std::vector<std::vector<uint8_t>>& _presets) const;
+ static bool savePresets(FileType _type, const std::string& _pathName, const std::vector<std::vector<uint8_t>>& _presets);
#endif
static std::string createValidFilename(FileType& _type, const juce::File& _file);
@@ -61,6 +61,8 @@ namespace jucePluginEditorLib
void showDisclaimer() const;
private:
+ void onDisclaimerFinished() const;
+
const char* getResourceByFilename(const std::string& _name, uint32_t& _dataSize) override;
int getParameterIndexByName(const std::string& _name) override;
bool bindParameter(juce::Button& _target, int _parameterIndex) override;