diff options
author | archshift <admin@archshift.com> | 2014-10-31 06:44:51 +0100 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-11-05 06:44:03 +0100 |
commit | 1efb83bf53036fb95235e70b955fc9e1673e3cca (patch) | |
tree | 2b659ef13806ebffc42d4e554015b321979564ff /src/citra_qt | |
parent | Merge pull request #182 from SeannyM/fix-compile (diff) | |
download | yuzu-1efb83bf53036fb95235e70b955fc9e1673e3cca.tar yuzu-1efb83bf53036fb95235e70b955fc9e1673e3cca.tar.gz yuzu-1efb83bf53036fb95235e70b955fc9e1673e3cca.tar.bz2 yuzu-1efb83bf53036fb95235e70b955fc9e1673e3cca.tar.lz yuzu-1efb83bf53036fb95235e70b955fc9e1673e3cca.tar.xz yuzu-1efb83bf53036fb95235e70b955fc9e1673e3cca.tar.zst yuzu-1efb83bf53036fb95235e70b955fc9e1673e3cca.zip |
Diffstat (limited to 'src/citra_qt')
-rw-r--r-- | src/citra_qt/main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 153712273..304c169b9 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -116,7 +116,10 @@ GMainWindow::GMainWindow() show(); - System::Init(render_window); + QStringList args = QApplication::arguments(); + if (args.length() >= 2) { + BootGame(args[1].toStdString()); + } } GMainWindow::~GMainWindow() @@ -129,6 +132,7 @@ GMainWindow::~GMainWindow() void GMainWindow::BootGame(std::string filename) { NOTICE_LOG(MASTER_LOG, "Citra starting...\n"); + System::Init(render_window); if (Core::Init()) { ERROR_LOG(MASTER_LOG, "Core initialization failed, exiting..."); @@ -149,6 +153,7 @@ void GMainWindow::BootGame(std::string filename) render_window->GetEmuThread().start(); render_window->show(); + OnStartGame(); } void GMainWindow::OnMenuLoadFile() @@ -185,6 +190,7 @@ void GMainWindow::OnPauseGame() void GMainWindow::OnStopGame() { render_window->GetEmuThread().SetCpuRunning(false); + // TODO: Shutdown core ui.action_Start->setEnabled(true); ui.action_Pause->setEnabled(false); @@ -246,7 +252,6 @@ int __cdecl main(int argc, char* argv[]) QApplication::setAttribute(Qt::AA_X11InitThreads); QApplication app(argc, argv); GMainWindow main_window; - main_window.show(); return app.exec(); } |