Skip to content

Commit 10e791d

Browse files
committed
Fix config loading.
1 parent 9cbe1b1 commit 10e791d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ project(EGIAmpServer
99
DESCRIPTION "EGI AmpServer to LSL bridge"
1010
HOMEPAGE_URL "https://github.com/labstreaminglayer/App-EGIAmpServer/"
1111
LANGUAGES CXX
12-
VERSION 2.0.0)
12+
VERSION 2.0.2)
1313

1414
set(CMAKE_CXX_STANDARD 20)
1515
set(CMAKE_CXX_STANDARD_REQUIRED ON)

src/gui/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#include <QApplication>
2+
#include <QDir>
23
#include "EGIAmpWindow.h"
34

45
int main(int argc, char* argv[]) {
56
QApplication app(argc, argv);
6-
EGIAmpWindow window(nullptr, argc > 1 ? argv[1] : "ampserver_config.cfg");
7+
std::string configPath = argc > 1
8+
? argv[1]
9+
: QDir(QCoreApplication::applicationDirPath())
10+
.filePath("ampserver_config.cfg").toStdString();
11+
EGIAmpWindow window(nullptr, configPath);
712
window.show();
813
return app.exec();
914
}

0 commit comments

Comments
 (0)