|
|
@ -1384,6 +1384,9 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
|
|
|
|
system.RegisterExecuteProgramCallback(
|
|
|
|
system.RegisterExecuteProgramCallback(
|
|
|
|
[this](std::size_t program_index) { render_window->ExecuteProgram(program_index); });
|
|
|
|
[this](std::size_t program_index) { render_window->ExecuteProgram(program_index); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Register an Exit callback such that Core can exit the currently running application.
|
|
|
|
|
|
|
|
system.RegisterExitCallback([this]() { render_window->Exit(); });
|
|
|
|
|
|
|
|
|
|
|
|
connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame);
|
|
|
|
connect(render_window, &GRenderWindow::Closed, this, &GMainWindow::OnStopGame);
|
|
|
|
connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity);
|
|
|
|
connect(render_window, &GRenderWindow::MouseActivity, this, &GMainWindow::OnMouseActivity);
|
|
|
|
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
|
|
|
|
// BlockingQueuedConnection is important here, it makes sure we've finished refreshing our views
|
|
|
@ -2469,6 +2472,10 @@ void GMainWindow::OnExecuteProgram(std::size_t program_index) {
|
|
|
|
BootGame(last_filename_booted, 0, program_index);
|
|
|
|
BootGame(last_filename_booted, 0, program_index);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::OnExit() {
|
|
|
|
|
|
|
|
OnStopGame();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::ErrorDisplayDisplayError(QString error_code, QString error_text) {
|
|
|
|
void GMainWindow::ErrorDisplayDisplayError(QString error_code, QString error_text) {
|
|
|
|
OverlayDialog dialog(render_window, Core::System::GetInstance(), error_code, error_text,
|
|
|
|
OverlayDialog dialog(render_window, Core::System::GetInstance(), error_code, error_text,
|
|
|
|
QString{}, tr("OK"), Qt::AlignLeft | Qt::AlignVCenter);
|
|
|
|
QString{}, tr("OK"), Qt::AlignLeft | Qt::AlignVCenter);
|
|
|
|