History

fix audio devices + login popup

HifiExperiments committed 2 years ago

Commit 2345bcc1 parent 16e7b8d4 files · +16 −16Browse files

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

Unified · Split

interface/src/Application_Setup.cpp+14−14
@@ -475,6 +475,7 @@ void Application::initialize(const QCommandLineParser &parser) { · 474 unmodified lines
475 _entityEditSender = std::make_shared<EntityEditPacketSender>();475 _entityEditSender = std::make_shared<EntityEditPacketSender>();
476 _graphicsEngine = std::make_shared<GraphicsEngine>();476 _graphicsEngine = std::make_shared<GraphicsEngine>();
477 _applicationOverlay = std::make_shared<ApplicationOverlay>();477 _applicationOverlay = std::make_shared<ApplicationOverlay>();
478 _dialogsManagerScriptingInterface = new DialogsManagerScriptingInterface();
478 479
479 auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();480 auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();
480 setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));481 setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
@@ -585,8 +586,9 @@ void Application::initialize(const QCommandLineParser &parser) { · 104 unmodified lines
585 }586 }
586 587
587#if !defined(Q_OS_ANDROID) && !defined(DISABLE_QML)588#if !defined(Q_OS_ANDROID) && !defined(DISABLE_QML)
589 const bool DISABLE_LOGIN_SCREEN = true; // Login screen is currently disabled
588 // Do not show login dialog if requested not to on the command line590 // Do not show login dialog if requested not to on the command line
589 if (parser.isSet("no-login-suggestion")) {591 if (DISABLE_LOGIN_SCREEN || parser.isSet("no-login-suggestion")) {
590 _noLoginSuggestion = true;592 _noLoginSuggestion = true;
591 }593 }
592#endif594#endif
@@ -803,6 +805,10 @@ void Application::initialize(const QCommandLineParser &parser) { · 210 unmodified lines
803 showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));805 showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
804 }806 }
805 807
808 // An audio device changed signal received before the display plugins are set up will cause a crash,
809 // so we defer the setup of the `scripting::Audio` class until this point
810 DependencyManager::set<AudioScriptingInterface, scripting::Audio>();
811
806 // Create the rendering engine. This can be slow on some machines due to lots of812 // Create the rendering engine. This can be slow on some machines due to lots of
807 // GPU pipeline creation.813 // GPU pipeline creation.
808 initializeRenderEngine();814 initializeRenderEngine();
@@ -2029,17 +2035,13 @@ void Application::setupSignalsAndOperators() { · 1220 unmodified lines
2029 resumeAfterLoginDialogActionTaken();2035 resumeAfterLoginDialogActionTaken();
2030 });2036 });
2031#else2037#else
2032 // Do not show login dialog if requested not to on the command line2038 connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2033 if (_noLoginSuggestion) {2039 // Do not show login dialog if requested not to on the command line
2034 connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {2040 if (!_noLoginSuggestion) {
2035 resumeAfterLoginDialogActionTaken();
2036 });
2037 } else {
2038 connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2039 showLoginScreen();2041 showLoginScreen();
2040 resumeAfterLoginDialogActionTaken();2042 }
2041 });2043 resumeAfterLoginDialogActionTaken();
2042 }2044 });
2043#endif2045#endif
2044 2046
2045 // Monitor model assets (e.g., from Clara.io) added to the world that may need resizing.2047 // Monitor model assets (e.g., from Clara.io) added to the world that may need resizing.
@@ -2137,9 +2139,7 @@ void Application::setupSignalsAndOperators() { · 91 unmodified lines
2137 });2139 });
2138 audioIO->startThread();2140 audioIO->startThread();
2139 2141
2140 // An audio device changed signal received before the display plugins are set up will cause a crash,2142 auto audioScriptingInterface = DependencyManager::get<AudioScriptingInterface>().data();
2141 // so we defer the setup of the `scripting::Audio` class until this point
2142 auto audioScriptingInterface = DependencyManager::set<AudioScriptingInterface, scripting::Audio>().data();
2143 connect(audioIO, &AudioClient::mutedByMixer, audioScriptingInterface, &AudioScriptingInterface::mutedByMixer);2143 connect(audioIO, &AudioClient::mutedByMixer, audioScriptingInterface, &AudioScriptingInterface::mutedByMixer);
2144 connect(audioIO, &AudioClient::receivedFirstPacket, audioScriptingInterface, &AudioScriptingInterface::receivedFirstPacket);2144 connect(audioIO, &AudioClient::receivedFirstPacket, audioScriptingInterface, &AudioScriptingInterface::receivedFirstPacket);
2145 connect(audioIO, &AudioClient::disconnected, audioScriptingInterface, &AudioScriptingInterface::disconnected);2145 connect(audioIO, &AudioClient::disconnected, audioScriptingInterface, &AudioScriptingInterface::disconnected);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t