aboutsummaryrefslogtreecommitdiffstats
path: root/games-emulation/simple64-gui/files/fix-paths.patch
blob: e153eb6d9fc7750b5e275deb1c71d3323a9b2959 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f967af..bb8833b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,12 @@ endif()
 include_directories(../mupen64plus-core/src/api)
 
 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x0602ff -DNETPLAY_VER=16)
+if(DEFINED PLUGIN_DIR_PATH)
+    add_definitions(-DPLUGIN_DIR_PATH="${PLUGIN_DIR_PATH}")
+endif()
+if(DEFINED CORE_LIBRARY_PATH)
+    add_definitions(-DCORE_LIBRARY_PATH="${CORE_LIBRARY_PATH}")
+endif()
 
 if(DEFINED ENV{NETPLAY_AUTH_CODE})
   add_definitions(-DNETPLAY_AUTH_CODE="$ENV{NETPLAY_AUTH_CODE}")
diff --git a/cheats.cpp b/cheats.cpp
index 84bac85..475b7a2 100644
--- a/cheats.cpp
+++ b/cheats.cpp
@@ -229,7 +229,7 @@ QString getCheatGameName()
 
 QJsonObject loadCheatData(QString gameName)
 {
-    QString cheats_path = QDir(QCoreApplication::applicationDirPath()).filePath("cheats.json");
+    QString cheats_path = QDir(QStringLiteral(u"/usr/share/mupen64plus")).filePath("cheats.json");
     QFile file(cheats_path);
     file.open(QIODevice::ReadOnly | QIODevice::Text);
 
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 2d46d81..3c29dd3 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -353,7 +353,7 @@ void MainWindow::updateApp()
 
 void MainWindow::setupDiscord()
 {
-    QLibrary *discordLib = new QLibrary((QDir(QCoreApplication::applicationDirPath()).filePath("discord_game_sdk")), this);
+    QLibrary *discordLib = new QLibrary(QStringLiteral("discord_game_sdk"), this);
 
     memset(&discord_app, 0, sizeof(discord_app));