From 72636ca97663c8ee1798dfe0f5b4f7836c6bda5e Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 1 May 2018 12:01:11 -0700 Subject: [PATCH] UI: Don't defer load on non-macOS systems Deferred load is used specifically for macOS systems to ensure that Qt and CEF do not load at the same time. This causes a slight bit of a delay in loading the scene after the UI has loaded. This is not necessary for other operating systems, so revert to the older load code in the case of different systems. --- UI/window-basic-main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 00e5cdbbd..2d9929b88 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -1450,6 +1450,15 @@ void OBSBasic::OBSInit() SET_VISIBILITY("ShowStatusBar", toggleStatusBar); #undef SET_VISIBILITY +#ifndef __APPLE__ + { + ProfileScope("OBSBasic::Load"); + disableSaving--; + Load(savePath); + disableSaving++; + } +#endif + TimedCheckForUpdates(); loaded = true; @@ -1470,6 +1479,9 @@ void OBSBasic::OBSInit() } #endif +#ifndef __APPLE__ + RefreshSceneCollections(); +#endif RefreshProfiles(); disableSaving--; @@ -1585,6 +1597,7 @@ void OBSBasic::OBSInit() ui->actionCheckForUpdates = nullptr; #endif +#ifdef __APPLE__ /* This is an incredibly unpleasant hack for macOS to isolate CEF * initialization until after all tasks related to Qt startup and main * window initialization have completed. There is a macOS-specific bug @@ -1604,6 +1617,7 @@ void OBSBasic::OBSInit() Qt::QueuedConnection, Q_ARG(QString, QT_UTF8(savePath)), Q_ARG(int, 10)); +#endif } void OBSBasic::DeferredLoad(const QString &file, int requeueCount)