mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 03:32:55 +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
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDesktopWidget>
|
||||
#include <QCommandLineParser>
|
||||
|
||||
#include "rpcs3_app.h"
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@ -18,6 +20,22 @@ int main(int argc, char** argv)
|
||||
#endif
|
||||
|
||||
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();
|
||||
|
||||
if (parser.positionalArguments().length() > 0)
|
||||
{
|
||||
Emu.SetPath(sstr(parser.positionalArguments().at(0)));
|
||||
Emu.Load();
|
||||
Emu.Run();
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user