effects system rewrite

This commit is contained in:
itsmattkc
2018-10-30 11:23:14 +11:00
parent 0817a1e486
commit 10347f9418
16 changed files with 327 additions and 144 deletions
+15 -3
View File
@@ -4,10 +4,22 @@
#include <QFileInfo>
#include <QCoreApplication>
QString get_data_path() {
QString app_path = QCoreApplication::applicationFilePath();
QString app_dir = app_path.left(app_path.lastIndexOf('/'));
QString real_app_dir;
QString get_effects_dir() {
return get_app_dir() + "/effects";
}
QString get_app_dir() {
if (real_app_dir.isEmpty()) {
QString app_path = QCoreApplication::applicationFilePath();
real_app_dir = app_path.left(app_path.lastIndexOf('/'));
}
return real_app_dir;
}
QString get_data_path() {
QString app_dir = get_app_dir();
if (QFileInfo::exists(app_dir + "/portable")) {
return app_dir;
} else {