aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorB3n30 <benediktthomas@gmail.com>2019-08-11 12:28:07 +0200
committerfearlessTobi <thm.frey@gmail.com>2019-08-22 14:41:11 +0200
commit246b515a869ebe4a8d6c12773db85724e8156f5d (patch)
treee2ca0eb654225e3ca38e73b73a8f260ce32d67c8 /src/yuzu/main.cpp
parentb4a8cfbd00863032fe4b4ed0145cfe1711b9317d (diff)
citra_qt: on osx chdir to bundle dir to allow detection of user folder
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index a7c656fdbf..693bb1fcf7 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -6,6 +6,7 @@
#include <clocale>
#include <memory>
#include <thread>
+#include <unistd.h>
// VFS includes must be before glad as they will conflict with Windows file api, which uses defines.
#include "applets/error.h"
@@ -2168,6 +2169,11 @@ int main(int argc, char* argv[]) {
QCoreApplication::setOrganizationName(QStringLiteral("yuzu team"));
QCoreApplication::setApplicationName(QStringLiteral("yuzu"));
+#ifdef __APPLE__
+ std::string bin_path = FileUtil::GetBundleDirectory() + DIR_SEP + "..";
+ chdir(bin_path.c_str());
+#endif
+
// Enables the core to make the qt created contexts current on std::threads
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
QApplication app(argc, argv);