diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-05-13 15:03:48 +0200 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2018-05-13 17:32:29 +0200 |
| commit | fa77e092397abd44bcd7f7bed8ba725510cb2a37 (patch) | |
| tree | 9090d17280daadd1285c63776872793364b2959d /Source | |
| parent | 99dff10d43895296a6e48d48467e1e8564d65a6b (diff) | |
Qt: Fix render widget not being on top when using -n / -e
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinQt2/Main.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.cpp | 14 | ||||
| -rw-r--r-- | Source/Core/DolphinQt2/MainWindow.h | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt2/Main.cpp b/Source/Core/DolphinQt2/Main.cpp index eb49052642..95593ebe34 100644 --- a/Source/Core/DolphinQt2/Main.cpp +++ b/Source/Core/DolphinQt2/Main.cpp @@ -180,7 +180,7 @@ int main(int argc, char* argv[]) MainWindow win{std::move(boot)}; if (options.is_set("debugger")) Settings::Instance().SetDebugModeEnabled(true); - win.show(); + win.Show(); #if defined(USE_ANALYTICS) && USE_ANALYTICS if (!SConfig::GetInstance().m_analytics_permission_asked) 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<BootParameters> 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(); + } +} diff --git a/Source/Core/DolphinQt2/MainWindow.h b/Source/Core/DolphinQt2/MainWindow.h index 3b76e27146..82520f68cb 100644 --- a/Source/Core/DolphinQt2/MainWindow.h +++ b/Source/Core/DolphinQt2/MainWindow.h @@ -58,6 +58,8 @@ public: explicit MainWindow(std::unique_ptr<BootParameters> boot_parameters); ~MainWindow(); + void Show(); + bool eventFilter(QObject* object, QEvent* event) override; signals: |
