Fix cmdline start

This commit is contained in:
Nekotekina 2017-07-13 18:34:37 +03:00
parent ce7b55871b
commit 15fe8f1c51

View File

@ -3,6 +3,8 @@
#include <QApplication> #include <QApplication>
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QFileInfo>
#include <QTimer>
#include "rpcs3_app.h" #include "rpcs3_app.h"
#ifdef _WIN32 #ifdef _WIN32
@ -34,9 +36,13 @@ int main(int argc, char** argv)
if (parser.positionalArguments().length() > 0) if (parser.positionalArguments().length() > 0)
{ {
Emu.SetPath(sstr(parser.positionalArguments().at(0))); // Ugly workaround
Emu.Load(); QTimer::singleShot(2, [path = sstr(QFileInfo(parser.positionalArguments().at(0)).canonicalFilePath())]
Emu.Run(); {
Emu.SetPath(path);
Emu.Load();
Emu.Run();
});
} }
return app.exec(); return app.exec();