mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:48:09 +02:00
fix audio devices + login popup
This commit is contained in:
parent
16e7b8d8b8
commit
2345bcc2b5
4 changed files with 16 additions and 16 deletions
|
@ -752,7 +752,7 @@ private:
|
||||||
bool _cursorNeedsChanging { false };
|
bool _cursorNeedsChanging { false };
|
||||||
bool _useSystemCursor { false };
|
bool _useSystemCursor { false };
|
||||||
|
|
||||||
DialogsManagerScriptingInterface* _dialogsManagerScriptingInterface { new DialogsManagerScriptingInterface() };
|
DialogsManagerScriptingInterface* _dialogsManagerScriptingInterface;
|
||||||
|
|
||||||
QPointer<LogDialog> _logDialog;
|
QPointer<LogDialog> _logDialog;
|
||||||
QPointer<EntityScriptServerLogDialog> _entityScriptServerLogDialog;
|
QPointer<EntityScriptServerLogDialog> _entityScriptServerLogDialog;
|
||||||
|
|
|
@ -475,6 +475,7 @@ void Application::initialize(const QCommandLineParser &parser) {
|
||||||
_entityEditSender = std::make_shared<EntityEditPacketSender>();
|
_entityEditSender = std::make_shared<EntityEditPacketSender>();
|
||||||
_graphicsEngine = std::make_shared<GraphicsEngine>();
|
_graphicsEngine = std::make_shared<GraphicsEngine>();
|
||||||
_applicationOverlay = std::make_shared<ApplicationOverlay>();
|
_applicationOverlay = std::make_shared<ApplicationOverlay>();
|
||||||
|
_dialogsManagerScriptingInterface = new DialogsManagerScriptingInterface();
|
||||||
|
|
||||||
auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();
|
auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();
|
||||||
setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
|
setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
|
||||||
|
@ -585,8 +586,9 @@ void Application::initialize(const QCommandLineParser &parser) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(Q_OS_ANDROID) && !defined(DISABLE_QML)
|
#if !defined(Q_OS_ANDROID) && !defined(DISABLE_QML)
|
||||||
|
const bool DISABLE_LOGIN_SCREEN = true; // Login screen is currently disabled
|
||||||
// Do not show login dialog if requested not to on the command line
|
// Do not show login dialog if requested not to on the command line
|
||||||
if (parser.isSet("no-login-suggestion")) {
|
if (DISABLE_LOGIN_SCREEN || parser.isSet("no-login-suggestion")) {
|
||||||
_noLoginSuggestion = true;
|
_noLoginSuggestion = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -803,6 +805,10 @@ void Application::initialize(const QCommandLineParser &parser) {
|
||||||
showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
|
showCursor(Cursor::Manager::lookupIcon(_preferredCursor.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// An audio device changed signal received before the display plugins are set up will cause a crash,
|
||||||
|
// so we defer the setup of the `scripting::Audio` class until this point
|
||||||
|
DependencyManager::set<AudioScriptingInterface, scripting::Audio>();
|
||||||
|
|
||||||
// Create the rendering engine. This can be slow on some machines due to lots of
|
// Create the rendering engine. This can be slow on some machines due to lots of
|
||||||
// GPU pipeline creation.
|
// GPU pipeline creation.
|
||||||
initializeRenderEngine();
|
initializeRenderEngine();
|
||||||
|
@ -2029,17 +2035,13 @@ void Application::setupSignalsAndOperators() {
|
||||||
resumeAfterLoginDialogActionTaken();
|
resumeAfterLoginDialogActionTaken();
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
// Do not show login dialog if requested not to on the command line
|
connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
|
||||||
if (_noLoginSuggestion) {
|
// Do not show login dialog if requested not to on the command line
|
||||||
connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
|
if (!_noLoginSuggestion) {
|
||||||
resumeAfterLoginDialogActionTaken();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
connect(offscreenUi, &OffscreenUi::keyboardFocusActive, [this]() {
|
|
||||||
showLoginScreen();
|
showLoginScreen();
|
||||||
resumeAfterLoginDialogActionTaken();
|
}
|
||||||
});
|
resumeAfterLoginDialogActionTaken();
|
||||||
}
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Monitor model assets (e.g., from Clara.io) added to the world that may need resizing.
|
// Monitor model assets (e.g., from Clara.io) added to the world that may need resizing.
|
||||||
|
@ -2137,9 +2139,7 @@ void Application::setupSignalsAndOperators() {
|
||||||
});
|
});
|
||||||
audioIO->startThread();
|
audioIO->startThread();
|
||||||
|
|
||||||
// An audio device changed signal received before the display plugins are set up will cause a crash,
|
auto audioScriptingInterface = DependencyManager::get<AudioScriptingInterface>().data();
|
||||||
// so we defer the setup of the `scripting::Audio` class until this point
|
|
||||||
auto audioScriptingInterface = DependencyManager::set<AudioScriptingInterface, scripting::Audio>().data();
|
|
||||||
connect(audioIO, &AudioClient::mutedByMixer, audioScriptingInterface, &AudioScriptingInterface::mutedByMixer);
|
connect(audioIO, &AudioClient::mutedByMixer, audioScriptingInterface, &AudioScriptingInterface::mutedByMixer);
|
||||||
connect(audioIO, &AudioClient::receivedFirstPacket, audioScriptingInterface, &AudioScriptingInterface::receivedFirstPacket);
|
connect(audioIO, &AudioClient::receivedFirstPacket, audioScriptingInterface, &AudioScriptingInterface::receivedFirstPacket);
|
||||||
connect(audioIO, &AudioClient::disconnected, audioScriptingInterface, &AudioScriptingInterface::disconnected);
|
connect(audioIO, &AudioClient::disconnected, audioScriptingInterface, &AudioScriptingInterface::disconnected);
|
||||||
|
|
|
@ -319,6 +319,7 @@ int main(int argc, const char* argv[]) {
|
||||||
parser.addOption(noLauncherOption);
|
parser.addOption(noLauncherOption);
|
||||||
parser.addOption(responseTokensOption);
|
parser.addOption(responseTokensOption);
|
||||||
parser.addOption(displayNameOption);
|
parser.addOption(displayNameOption);
|
||||||
|
parser.addOption(noLoginOption);
|
||||||
parser.addOption(overrideScriptsPathOption);
|
parser.addOption(overrideScriptsPathOption);
|
||||||
parser.addOption(defaultScriptsOverrideOption);
|
parser.addOption(defaultScriptsOverrideOption);
|
||||||
parser.addOption(traceFileOption);
|
parser.addOption(traceFileOption);
|
||||||
|
|
|
@ -99,7 +99,6 @@ NodeList::NodeList(char newOwnerType, int socketListenPort, int dtlsListenPort)
|
||||||
// FIXME: Can remove this temporary work-around in version 2021.2.0. (New protocol version implies a domain server upgrade.)
|
// FIXME: Can remove this temporary work-around in version 2021.2.0. (New protocol version implies a domain server upgrade.)
|
||||||
// Adjust our canRezAvatarEntities permissions on older domains that do not have this setting.
|
// Adjust our canRezAvatarEntities permissions on older domains that do not have this setting.
|
||||||
// DomainServerList and DomainSettings packets can come in either order so need to adjust with both occurrences.
|
// DomainServerList and DomainSettings packets can come in either order so need to adjust with both occurrences.
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
|
||||||
connect(&_domainHandler, &DomainHandler::settingsReceived, this, &NodeList::adjustCanRezAvatarEntitiesPerSettings);
|
connect(&_domainHandler, &DomainHandler::settingsReceived, this, &NodeList::adjustCanRezAvatarEntitiesPerSettings);
|
||||||
|
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
|
|
Loading…
Reference in a new issue