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
475475 _entityEditSender = std::make_shared<EntityEditPacketSender>();
476476 _graphicsEngine = std::make_shared<GraphicsEngine>();
477477 _applicationOverlay = std::make_shared<ApplicationOverlay>();
478+ _dialogsManagerScriptingInterface = new DialogsManagerScriptingInterface();
478479
479480 auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();
480481 setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
@@ -585,8 +586,9 @@ void Application::initialize(const QCommandLineParser &parser) { · 104 unmodified lines
585586 }
586587
587588 #if !defined(Q_OS_ANDROID) && !defined(DISABLE_QML)
589+ const bool DISABLE_LOGIN_SCREEN = true; // Login screen is currently disabled
588590 // 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")) {
590592 _noLoginSuggestion = true;
591593 }
592594 #endif
@@ -803,6 +805,10 @@ void Application::initialize(const QCommandLineParser &parser) { · 210 unmodified lines
803805 showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
804806 }
805807
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+
806812 // Create the rendering engine. This can be slow on some machines due to lots of
807813 // GPU pipeline creation.
808814 initializeRenderEngine();
@@ -2029,17 +2035,13 @@ void Application::setupSignalsAndOperators() { · 1220 unmodified lines
20292035 resumeAfterLoginDialogActionTaken();
20302036 });
20312037 #else
2032− // Do not show login dialog if requested not to on the command line
2033− if (_noLoginSuggestion) {
2034− connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2035− resumeAfterLoginDialogActionTaken();
2036− });
2037− } else {
2038− connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2038+ connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2039+ // Do not show login dialog if requested not to on the command line
2040+ if (!_noLoginSuggestion) {
20392041 showLoginScreen();
2040− resumeAfterLoginDialogActionTaken();
2041− });
2042− }
2042+ }
2043+ resumeAfterLoginDialogActionTaken();
2044+ });
20432045 #endif
20442046
20452047 // 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
21372139 });
21382140 audioIO->startThread();
21392141
2140− // An audio device changed signal received before the display plugins are set up will cause a crash,
2141− // so we defer the setup of the `scripting::Audio` class until this point
2142− auto audioScriptingInterface = DependencyManager::set<AudioScriptingInterface, scripting::Audio>().data();
2142+ auto audioScriptingInterface = DependencyManager::get<AudioScriptingInterface>().data();
21432143 connect(audioIO, &AudioClient::mutedByMixer, audioScriptingInterface, &AudioScriptingInterface::mutedByMixer);
21442144 connect(audioIO, &AudioClient::receivedFirstPacket, audioScriptingInterface, &AudioScriptingInterface::receivedFirstPacket);
21452145 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