subdirectory searching for frags
This commit is contained in:
+21
-10
@@ -39,7 +39,9 @@ typedef void (*f0rGetPluginInfo)(f0r_plugin_info_t* info);
|
||||
#endif
|
||||
|
||||
void load_internal_effects() {
|
||||
if (!olive::CurrentRuntimeConfig.shaders_are_enabled) qWarning() << "Shaders are disabled, some effects may be nonfunctional";
|
||||
if (!olive::CurrentRuntimeConfig.shaders_are_enabled) {
|
||||
qWarning() << "Shaders are disabled, some effects may be nonfunctional";
|
||||
}
|
||||
|
||||
EffectMeta em;
|
||||
|
||||
@@ -135,15 +137,15 @@ void load_internal_effects() {
|
||||
effects.append(em);
|
||||
}
|
||||
|
||||
void load_shader_effects() {
|
||||
QList<QString> effects_paths = get_effects_paths();
|
||||
|
||||
for (int h=0;h<effects_paths.size();h++) {
|
||||
const QString& effects_path = effects_paths.at(h);
|
||||
QDir effects_dir(effects_path);
|
||||
if (effects_dir.exists()) {
|
||||
QList<QString> entries = effects_dir.entryList(QStringList("*.xml"), QDir::Files);
|
||||
for (int i=0;i<entries.size();i++) {
|
||||
void load_shader_effects_worker(const QString& effects_path) {
|
||||
QDir effects_dir(effects_path);
|
||||
if (effects_dir.exists()) {
|
||||
QList<QString> entries = effects_dir.entryList(QStringList("*.xml"), QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
|
||||
for (int i=0;i<entries.size();i++) {
|
||||
QString entry_path = effects_dir.filePath(entries.at(i));
|
||||
if (QFileInfo(entry_path).isDir()) {
|
||||
load_shader_effects_worker(entry_path);
|
||||
} else {
|
||||
QFile file(effects_path + "/" + entries.at(i));
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
qCritical() << "Could not open" << entries.at(i);
|
||||
@@ -187,6 +189,15 @@ void load_shader_effects() {
|
||||
}
|
||||
}
|
||||
|
||||
void load_shader_effects() {
|
||||
QList<QString> effects_paths = get_effects_paths();
|
||||
|
||||
for (int h=0;h<effects_paths.size();h++) {
|
||||
const QString& effects_path = effects_paths.at(h);
|
||||
load_shader_effects_worker(effects_path);
|
||||
}
|
||||
}
|
||||
|
||||
void EffectInit::StartLoading() {
|
||||
EffectInit* init_thread = new EffectInit();
|
||||
QObject::connect(init_thread, SIGNAL(finished()), init_thread, SLOT(deleteLater()));
|
||||
|
||||
Reference in New Issue
Block a user