History

Merge branch 'master' of github.com:highfidelity/hifi into update-interstitial

Dante Ruiz committed 8 years ago

Commit fa5dfb62 parents 57ae8ff c5ff72b43 files · +727 −271Browse files

Showing the changes to interface/src/Application.cpp (1 of 43 files). Show all

Unified · Split

interface/src/Application.cpp+11−8
@@ -1760,10 +1760,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1759 unmodified lines
17601760
17611761 // Make sure we don't time out during slow operations at startup
17621762 updateHeartbeat();
1763−
17641763 QTimer* settingsTimer = new QTimer();
17651764 moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{
1766− connect(qApp, &Application::beforeAboutToQuit, [this, settingsTimer]{
1765+ // This needs to run on the settings thread, so we need to pass the `settingsTimer` as the
1766+ // receiver object, otherwise it will run on the application thread and trigger a warning
1767+ // about trying to kill the timer on the main thread.
1768+ connect(qApp, &Application::beforeAboutToQuit, settingsTimer, [this, settingsTimer]{
17671769 // Disconnect the signal from the save settings
17681770 QObject::disconnect(settingsTimer, &QTimer::timeout, this, &Application::saveSettings);
17691771 // Stop the settings timer
@@ -3499,13 +3501,14 @@ bool Application::isServerlessMode() const { · 1729 unmodified lines
34993501 }
35003502
35013503 void Application::setIsInterstitialMode(bool interstitialMode) {
3502− Settings settings;
3503− bool enableInterstitial = settings.value("enableIntersitialMode", false).toBool();
3504− if (_interstitialMode != interstitialMode && enableInterstitial) {
3505− _interstitialMode = interstitialMode;
3504+ bool enableInterstitial = DependencyManager::get<NodeList>()->getDomainHandler().getInterstitialModeEnabled();
3505+ if (enableInterstitial) {
3506+ if (_interstitialMode != interstitialMode) {
3507+ _interstitialMode = interstitialMode;
35063508
3507− DependencyManager::get<AudioClient>()->setAudioPaused(_interstitialMode);
3508− DependencyManager::get<AvatarManager>()->setMyAvatarDataPacketsPaused(_interstitialMode);
3509+ DependencyManager::get<AudioClient>()->setAudioPaused(_interstitialMode);
3510+ DependencyManager::get<AvatarManager>()->setMyAvatarDataPacketsPaused(_interstitialMode);
3511+ }
35093512 }
35103513 }
35113514