Showing the changes to interface/src/Application.cpp (1 of 43 files). Show all
Unified · Split
| @@ -1760,10 +1760,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1759 unmodified lines | |||
| 1760 | 1760 | ||
| 1761 | // Make sure we don't time out during slow operations at startup | 1761 | // Make sure we don't time out during slow operations at startup |
| 1762 | updateHeartbeat(); | 1762 | updateHeartbeat(); |
| 1763 | |||
| 1764 | QTimer* settingsTimer = new QTimer(); | 1763 | QTimer* settingsTimer = new QTimer(); |
| 1765 | moveToNewNamedThread(settingsTimer, "Settings Thread", [this, settingsTimer]{ | 1764 | 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]{ | ||
| 1767 | // Disconnect the signal from the save settings | 1769 | // Disconnect the signal from the save settings |
| 1768 | QObject::disconnect(settingsTimer, &QTimer::timeout, this, &Application::saveSettings); | 1770 | QObject::disconnect(settingsTimer, &QTimer::timeout, this, &Application::saveSettings); |
| 1769 | // Stop the settings timer | 1771 | // Stop the settings timer |
| @@ -3499,13 +3501,14 @@ bool Application::isServerlessMode() const { · 1729 unmodified lines | |||
| 3499 | } | 3501 | } |
| 3500 | 3502 | ||
| 3501 | void Application::setIsInterstitialMode(bool interstitialMode) { | 3503 | void Application::setIsInterstitialMode(bool interstitialMode) { |
| 3502 | Settings settings; | 3504 | bool enableInterstitial = DependencyManager::get<NodeList>()->getDomainHandler().getInterstitialModeEnabled(); |
| 3503 | bool enableInterstitial = settings.value("enableIntersitialMode", false).toBool(); | 3505 | if (enableInterstitial) { |
| 3504 | if (_interstitialMode != interstitialMode && enableInterstitial) { | 3506 | if (_interstitialMode != interstitialMode) { |
| 3505 | _interstitialMode = interstitialMode; | 3507 | _interstitialMode = interstitialMode; |
| 3506 | 3508 | ||
| 3507 | DependencyManager::get<AudioClient>()->setAudioPaused(_interstitialMode); | 3509 | DependencyManager::get<AudioClient>()->setAudioPaused(_interstitialMode); |
| 3508 | DependencyManager::get<AvatarManager>()->setMyAvatarDataPacketsPaused(_interstitialMode); | 3510 | DependencyManager::get<AvatarManager>()->setMyAvatarDataPacketsPaused(_interstitialMode); |
| 3511 | } | ||
| 3509 | } | 3512 | } |
| 3510 | } | 3513 | } |
| 3511 | 3514 | ||