diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index 6ea70886ee..874253ed78 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -251,7 +251,6 @@ int main(int argc, char* argv[]) Settings::Instance().ApplyStyle(); MainWindow win{std::move(boot), static_cast(options.get("movie"))}; - win.Show(); #if defined(USE_ANALYTICS) && USE_ANALYTICS if (!Config::Get(Config::MAIN_ANALYTICS_PERMISSION_ASKED)) diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 0bef377f07..3cc51ac5f3 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -240,7 +240,10 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters, restoreState(settings.value(QStringLiteral("mainwindow/state")).toByteArray()); restoreGeometry(settings.value(QStringLiteral("mainwindow/geometry")).toByteArray()); if (!Settings::Instance().IsBatchModeEnabled()) + { + SetQWidgetWindowDecorations(this); show(); + } InitControllers(); ConnectHotkeys(); @@ -320,6 +323,12 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters, } Host::GetInstance()->SetMainWindowHandle(reinterpret_cast(winId())); + + if (m_pending_boot != nullptr) + { + StartGame(std::move(m_pending_boot)); + m_pending_boot.reset(); + } } MainWindow::~MainWindow() @@ -2073,19 +2082,3 @@ void MainWindow::ShowRiivolutionBootWidget(const UICommon::GameFile& game) AddRiivolutionPatches(boot_params.get(), std::move(w.GetPatches())); StartGame(std::move(boot_params)); } - -void MainWindow::Show() -{ - if (!Settings::Instance().IsBatchModeEnabled()) - { - SetQWidgetWindowDecorations(this); - 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/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h index ede2380125..2dcb73ceb2 100644 --- a/Source/Core/DolphinQt/MainWindow.h +++ b/Source/Core/DolphinQt/MainWindow.h @@ -78,7 +78,6 @@ public: const std::string& movie_path); ~MainWindow(); - void Show(); WindowSystemInfo GetWindowSystemInfo() const; bool eventFilter(QObject* object, QEvent* event) override;