mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Add ability to boot elves in command line. (#2859)
This commit is contained in:
parent
a3d1f7b7b0
commit
5c7a4b1405
@ -2,13 +2,15 @@
|
|||||||
// by Sacha Refshauge
|
// by Sacha Refshauge
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDebug>
|
#include <QCommandLineParser>
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include "rpcs3_app.h"
|
#include "rpcs3_app.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -18,6 +20,22 @@ int main(int argc, char** argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
rpcs3_app app(argc, argv);
|
rpcs3_app app(argc, argv);
|
||||||
|
|
||||||
|
// Command line args
|
||||||
|
QCommandLineParser parser;
|
||||||
|
parser.setApplicationDescription("Welcome to RPCS3 command line.");
|
||||||
|
parser.addPositionalArgument("(S)ELF", "Path for directly executing a (S)ELF");
|
||||||
|
parser.addHelpOption();
|
||||||
|
parser.process(app);
|
||||||
|
|
||||||
app.Init();
|
app.Init();
|
||||||
|
|
||||||
|
if (parser.positionalArguments().length() > 0)
|
||||||
|
{
|
||||||
|
Emu.SetPath(sstr(parser.positionalArguments().at(0)));
|
||||||
|
Emu.Load();
|
||||||
|
Emu.Run();
|
||||||
|
}
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user