mirror of
https://github.com/Rosalie241/RMG.git
synced 2026-07-11 01:24:01 +02:00
RMG: adjust the directory code in main.cpp
This commit is contained in:
+10
-2
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
#include <RMG-Core/Core.hpp>
|
||||
#include <iostream>
|
||||
@@ -138,7 +138,15 @@ int main(int argc, char **argv)
|
||||
UserInterface::MainWindow window;
|
||||
|
||||
#ifdef PORTABLE_INSTALL
|
||||
QDir::setCurrent(app.applicationDirPath());
|
||||
// we have to keep backwards compatability
|
||||
// with <v0.5.2, so we'll check if a portable.txt file exists,
|
||||
// or if the Config/mupen64plus.cfg file exists, if it does,
|
||||
// then change the current directory to the executable path
|
||||
if (QFile(app.applicationDirPath() + "/portable.txt").exists() ||
|
||||
QFile(app.applicationDirPath() + "/Config/mupen64plus.cfg").exists())
|
||||
{
|
||||
QDir::setCurrent(app.applicationDirPath());
|
||||
}
|
||||
#endif
|
||||
|
||||
QCoreApplication::setApplicationName("Rosalie's Mupen GUI");
|
||||
|
||||
Reference in New Issue
Block a user