From fa77e092397abd44bcd7f7bed8ba725510cb2a37 Mon Sep 17 00:00:00 2001 From: spycrab Date: Sun, 13 May 2018 15:03:48 +0200 Subject: Qt: Fix render widget not being on top when using -n / -e --- Source/Core/DolphinQt2/MainWindow.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Source/Core/DolphinQt2/MainWindow.cpp') diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index 5b0b318582..aa15975cde 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -110,7 +110,7 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters) : QMainW NetPlayInit(); if (boot_parameters) - StartGame(std::move(boot_parameters)); + m_pending_boot = std::move(boot_parameters); QSettings& settings = Settings::GetQSettings(); @@ -1351,3 +1351,15 @@ void MainWindow::OnUpdateProgressDialog(QString title, int progress, int total) m_progress_dialog = nullptr; } } + +void MainWindow::Show() +{ + QWidget::show(); + + // If the booting of a game was requested on start up, do that now + if (m_pending_boot != nullptr) + { + StartGame(std::move(m_pending_boot)); + m_pending_boot.reset(); + } +} -- cgit v1.2.3