summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2018-07-03 04:03:31 +0200
committerGitHub <noreply@github.com>2018-07-03 04:03:31 +0200
commit472cd14d1d5f6bb261de130bfeafed360ee124c3 (patch)
tree186907bd976625b7fdf98de888cfa71ebd33860a /Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp
parent4eeef6e5b39b11daefca009c8645560591accc52 (diff)
parentda0de12cced1574d70bc3ac7df4a1d9012833df7 (diff)
Merge pull request #7206 from delroth/qt-boottime
dqt2: lazy-initialize GraphicsWindow
Diffstat (limited to 'Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp')
-rw-r--r--Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp b/Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp
index bccac209de..0aaa900588 100644
--- a/Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp
+++ b/Source/Core/DolphinQt2/Config/Graphics/GraphicsWindow.cpp
@@ -27,6 +27,17 @@
GraphicsWindow::GraphicsWindow(X11Utils::XRRConfiguration* xrr_config, MainWindow* parent)
: QDialog(parent), m_xrr_config(xrr_config)
{
+ // GraphicsWindow initialization is heavy due to dependencies on the graphics subsystem.
+ // To prevent blocking startup, we create the layout and children at first show time.
+}
+
+void GraphicsWindow::Initialize()
+{
+ if (m_lazy_initialized)
+ return;
+
+ m_lazy_initialized = true;
+
g_Config.Refresh();
g_video_backend->InitBackendInfo();