summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/citra_qt/main.cpp9
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()
116 116
117 show(); 117 show();
118 118
119 System::Init(render_window); 119 QStringList args = QApplication::arguments();
120 if (args.length() >= 2) {
121 BootGame(args[1].toStdString());
122 }
120} 123}
121 124
122GMainWindow::~GMainWindow() 125GMainWindow::~GMainWindow()
@@ -129,6 +132,7 @@ GMainWindow::~GMainWindow()
129void GMainWindow::BootGame(std::string filename) 132void GMainWindow::BootGame(std::string filename)
130{ 133{
131 NOTICE_LOG(MASTER_LOG, "Citra starting...\n"); 134 NOTICE_LOG(MASTER_LOG, "Citra starting...\n");
135 System::Init(render_window);
132 136
133 if (Core::Init()) { 137 if (Core::Init()) {
134 ERROR_LOG(MASTER_LOG, "Core initialization failed, exiting..."); 138 ERROR_LOG(MASTER_LOG, "Core initialization failed, exiting...");
@@ -149,6 +153,7 @@ void GMainWindow::BootGame(std::string filename)
149 render_window->GetEmuThread().start(); 153 render_window->GetEmuThread().start();
150 154
151 render_window->show(); 155 render_window->show();
156 OnStartGame();
152} 157}
153 158
154void GMainWindow::OnMenuLoadFile() 159void GMainWindow::OnMenuLoadFile()
@@ -185,6 +190,7 @@ void GMainWindow::OnPauseGame()
185void GMainWindow::OnStopGame() 190void GMainWindow::OnStopGame()
186{ 191{
187 render_window->GetEmuThread().SetCpuRunning(false); 192 render_window->GetEmuThread().SetCpuRunning(false);
193 // TODO: Shutdown core
188 194
189 ui.action_Start->setEnabled(true); 195 ui.action_Start->setEnabled(true);
190 ui.action_Pause->setEnabled(false); 196 ui.action_Pause->setEnabled(false);
@@ -246,7 +252,6 @@ int __cdecl main(int argc, char* argv[])
246 QApplication::setAttribute(Qt::AA_X11InitThreads); 252 QApplication::setAttribute(Qt::AA_X11InitThreads);
247 QApplication app(argc, argv); 253 QApplication app(argc, argv);
248 GMainWindow main_window; 254 GMainWindow main_window;
249
250 main_window.show(); 255 main_window.show();
251 return app.exec(); 256 return app.exec();
252} 257}