summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/MainWindow.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-07-04 21:13:19 +0200
committerGitHub <noreply@github.com>2024-07-04 21:13:19 +0200
commitbb4e8d0d01c0e980769ea94b4dd9097adef1b640 (patch)
tree85f91c4bb204cf42d22c33b3efa343e196be12ad /Source/Core/DolphinQt/MainWindow.cpp
parent1fb4dbcea46985eeeca04714b27f01bdae776f2f (diff)
parent81fc60f88802aa9fa5f92ebe6bf7f3c824880632 (diff)
Merge pull request #12888 from TryTwo/Fix_Window_Titlebar
MainWindow: Bugfix. Windows Dark mode titlebar not being set.
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
-rw-r--r--Source/Core/DolphinQt/MainWindow.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp
index f62a7496e7..772fee9abf 100644
--- a/Source/Core/DolphinQt/MainWindow.cpp
+++ b/Source/Core/DolphinQt/MainWindow.cpp
@@ -240,7 +240,10 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> 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<BootParameters> boot_parameters,
}
Host::GetInstance()->SetMainWindowHandle(reinterpret_cast<void*>(winId()));
+
+ if (m_pending_boot != nullptr)
+ {
+ StartGame(std::move(m_pending_boot));
+ m_pending_boot.reset();
+ }
}
MainWindow::~MainWindow()
@@ -2072,19 +2081,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();
- }
-}