made frei0r disableable

This commit is contained in:
itsmattkc
2019-01-21 01:37:20 +11:00
parent 061ef88bdf
commit 2746e727f6
4 changed files with 14 additions and 0 deletions
+4
View File
@@ -1,5 +1,7 @@
#include "frei0reffect.h"
#ifndef NOFREI0R
#include <QMessageBox>
#include <QDir>
@@ -170,3 +172,5 @@ void Frei0rEffect::process_image(double timecode, uint8_t *input, uint8_t *outpu
update_func(instance, timecode, reinterpret_cast<uint32_t*>(input), reinterpret_cast<uint32_t*>(output));
}
#endif
+4
View File
@@ -1,6 +1,8 @@
#ifndef FREI0REFFECT_H
#define FREI0REFFECT_H
#ifndef NOFREI0R
#include "project/effect.h"
#include <frei0r.h>
@@ -24,4 +26,6 @@ private:
f0rGetParamInfo get_param_info;
};
#endif
#endif // FREI0REFFECT_H
+2
View File
@@ -67,7 +67,9 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
#ifdef _WIN32
case EFFECT_INTERNAL_VST: return new VSTHostWin(c, em);
#endif
#ifndef NOFREI0R
case EFFECT_INTERNAL_FREI0R: return new Frei0rEffect(c, em);
#endif
}
} else if (!em->filename.isEmpty()) {
// load effect from file
+4
View File
@@ -165,6 +165,7 @@ void init_effects() {
init_thread->start();
}
#ifndef NOFREI0R
void load_frei0r_effects_worker(const QString& dir, EffectMeta& em) {
QDir search_dir(dir);
if (search_dir.exists()) {
@@ -226,6 +227,7 @@ void load_frei0r_effects() {
load_frei0r_effects_worker(effect_dirs.at(i), em);
}
}
#endif
EffectInit::EffectInit() {
panel_effect_controls->effects_loaded.lock();
@@ -235,7 +237,9 @@ void EffectInit::run() {
qInfo() << "Initializing effects...";
load_internal_effects();
load_shader_effects();
#ifndef NOFREI0R
load_frei0r_effects();
#endif
panel_effect_controls->effects_loaded.unlock();
qInfo() << "Finished initializing effects";
}