Skip to content

Commit ba0ab8d

Browse files
fix audio devices + login popup
1 parent 69de648 commit ba0ab8d

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
@@ -743,7 +743,7 @@ private slots:
743743
bool _cursorNeedsChanging { false };
744744
bool _useSystemCursor { false };
745745

746-
DialogsManagerScriptingInterface* _dialogsManagerScriptingInterface { new DialogsManagerScriptingInterface() };
746+
DialogsManagerScriptingInterface* _dialogsManagerScriptingInterface;
747747

748748
QPointer<LogDialog> _logDialog;
749749
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();
@@ -2016,17 +2022,13 @@ void Application::setupSignalsAndOperators() {
20162022
resumeAfterLoginDialogActionTaken();
20172023
});
20182024
#else
2019-
// Do not show login dialog if requested not to on the command line
2020-
if (_noLoginSuggestion) {
2021-
connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2022-
resumeAfterLoginDialogActionTaken();
2023-
});
2024-
} else {
2025-
connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2025+
connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
2026+
// Do not show login dialog if requested not to on the command line
2027+
if (!_noLoginSuggestion) {
20262028
showLoginScreen();
2027-
resumeAfterLoginDialogActionTaken();
2028-
});
2029-
}
2029+
}
2030+
resumeAfterLoginDialogActionTaken();
2031+
});
20302032
#endif
20312033

20322034
// Monitor model assets (e.g., from Clara.io) added to the world that may need resizing.
@@ -2124,9 +2126,7 @@ void Application::setupSignalsAndOperators() {
21242126
});
21252127
audioIO->startThread();
21262128

2127-
// An audio device changed signal received before the display plugins are set up will cause a crash,
2128-
// so we defer the setup of the `scripting::Audio` class until this point
2129-
auto audioScriptingInterface = DependencyManager::set<AudioScriptingInterface, scripting::Audio>().data();
2129+
auto audioScriptingInterface = DependencyManager::get<AudioScriptingInterface>().data();
21302130
connect(audioIO, &AudioClient::mutedByMixer, audioScriptingInterface, &AudioScriptingInterface::mutedByMixer);
21312131
connect(audioIO, &AudioClient::receivedFirstPacket, audioScriptingInterface, &AudioScriptingInterface::receivedFirstPacket);
21322132
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
@@ -311,6 +311,7 @@ int main(int argc, const char* argv[]) {
311311
parser.addOption(noLauncherOption);
312312
parser.addOption(responseTokensOption);
313313
parser.addOption(displayNameOption);
314+
parser.addOption(noLoginOption);
314315
parser.addOption(overrideScriptsPathOption);
315316
parser.addOption(defaultScriptsOverrideOption);
316317
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)