Skip to content

Commit 2345bcc

Browse files
fix audio devices + login popup
1 parent 16e7b8d commit 2345bcc

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

interface/src/Application.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ private slots:
752752
bool _cursorNeedsChanging { false };
753753
bool _useSystemCursor { false };
754754

755-
DialogsManagerScriptingInterface* _dialogsManagerScriptingInterface { new DialogsManagerScriptingInterface() };
755+
DialogsManagerScriptingInterface* _dialogsManagerScriptingInterface;
756756

757757
QPointer<LogDialog> _logDialog;
758758
QPointer<EntityScriptServerLogDialog> _entityScriptServerLogDialog;

interface/src/Application_Setup.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ void Application::initialize(const QCommandLineParser &parser) {
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) {
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) {
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() {
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() {
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);

interface/src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ int main(int argc, const char* argv[]) {
319319
parser.addOption(noLauncherOption);
320320
parser.addOption(responseTokensOption);
321321
parser.addOption(displayNameOption);
322+
parser.addOption(noLoginOption);
322323
parser.addOption(overrideScriptsPathOption);
323324
parser.addOption(defaultScriptsOverrideOption);
324325
parser.addOption(traceFileOption);

libraries/networking/src/NodeList.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ NodeList::NodeList(char newOwnerType, int socketListenPort, int dtlsListenPort)
9999
// FIXME: Can remove this temporary work-around in version 2021.2.0. (New protocol version implies a domain server upgrade.)
100100
// Adjust our canRezAvatarEntities permissions on older domains that do not have this setting.
101101
// DomainServerList and DomainSettings packets can come in either order so need to adjust with both occurrences.
102-
auto nodeList = DependencyManager::get<NodeList>();
103102
connect(&_domainHandler, &DomainHandler::settingsReceived, this, &NodeList::adjustCanRezAvatarEntitiesPerSettings);
104103

105104
auto accountManager = DependencyManager::get<AccountManager>();

0 commit comments

Comments
 (0)