mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:18:12 +02:00
Fix plugin activation
This commit is contained in:
parent
c912f2f7d7
commit
518e480a8b
1 changed files with 13 additions and 7 deletions
|
@ -2409,7 +2409,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
|
|
||||||
qCDebug(interfaceapp) << "Metaverse session ID is" << uuidStringWithoutCurlyBraces(accountManager->getSessionID());
|
qCDebug(interfaceapp) << "Metaverse session ID is" << uuidStringWithoutCurlyBraces(accountManager->getSessionID());
|
||||||
|
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID) &&
|
||||||
connect(&AndroidHelper::instance(), &AndroidHelper::beforeEnterBackground, this, &Application::beforeEnterBackground);
|
connect(&AndroidHelper::instance(), &AndroidHelper::beforeEnterBackground, this, &Application::beforeEnterBackground);
|
||||||
connect(&AndroidHelper::instance(), &AndroidHelper::enterBackground, this, &Application::enterBackground);
|
connect(&AndroidHelper::instance(), &AndroidHelper::enterBackground, this, &Application::enterBackground);
|
||||||
connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground);
|
connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground);
|
||||||
|
@ -9140,17 +9140,23 @@ void Application::beforeEnterBackground() {
|
||||||
void Application::enterBackground() {
|
void Application::enterBackground() {
|
||||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||||
"stop", Qt::BlockingQueuedConnection);
|
"stop", Qt::BlockingQueuedConnection);
|
||||||
// if (getActiveDisplayPlugin()->isActive()) {
|
// Quest only supports one plugin which can't be deactivated currently
|
||||||
// getActiveDisplayPlugin()->deactivate();
|
#if !defined(ANDROID_APP_QUEST_INTERFACE)
|
||||||
// }
|
if (getActiveDisplayPlugin()->isActive()) {
|
||||||
|
getActiveDisplayPlugin()->deactivate();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::enterForeground() {
|
void Application::enterForeground() {
|
||||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||||
"start", Qt::BlockingQueuedConnection);
|
"start", Qt::BlockingQueuedConnection);
|
||||||
// if (!getActiveDisplayPlugin() || getActiveDisplayPlugin()->isActive() || !getActiveDisplayPlugin()->activate()) {
|
// Quest only supports one plugin which can't be deactivated currently
|
||||||
// qWarning() << "Could not re-activate display plugin";
|
#if !defined(ANDROID_APP_QUEST_INTERFACE)
|
||||||
// }
|
if (!getActiveDisplayPlugin() || getActiveDisplayPlugin()->isActive() || !getActiveDisplayPlugin()->activate()) {
|
||||||
|
qWarning() << "Could not re-activate display plugin";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
nodeList->setSendDomainServerCheckInEnabled(true);
|
nodeList->setSendDomainServerCheckInEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue