Skip to content

Commit

Permalink
Deduplicate "QMamehook/QMamehook" on Windows
Browse files Browse the repository at this point in the history
There's probably a better generic path to use for this? Dirty, but quick and works for what I need.
  • Loading branch information
SeongGino authored Mar 21, 2024
1 parent 82948b6 commit 9c2de5c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qhookermain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,14 @@ void qhookerMain::GameSearching(QString input)
}
gameName = input.remove(0, input.indexOf("=")+1);
qInfo() << gameName;
LoadConfig(QString(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/QMamehook/ini/" + gameName + ".ini"));

// TODO: there might be a better path for this? Trying to prevent "../QMamehook/QMamehook/ini" on Windows here.
#ifdef Q_OS_WIN
LoadConfig(QString(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/ini/" + gameName + ".ini"));
#else
LoadConfig(QString(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/QMamehook/ini/" + gameName + ".ini"));
#endif

if(settings->contains("MameStart")) {
//qInfo() << "Detected start statement:";
QStringList tempBuffer = settings->value("MameStart").toStringList();
Expand Down

0 comments on commit 9c2de5c

Please sign in to comment.