mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 16:13:43 +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());
|
||||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
#if defined(Q_OS_ANDROID) &&
|
||||
connect(&AndroidHelper::instance(), &AndroidHelper::beforeEnterBackground, this, &Application::beforeEnterBackground);
|
||||
connect(&AndroidHelper::instance(), &AndroidHelper::enterBackground, this, &Application::enterBackground);
|
||||
connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground);
|
||||
|
@ -9140,17 +9140,23 @@ void Application::beforeEnterBackground() {
|
|||
void Application::enterBackground() {
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||
"stop", Qt::BlockingQueuedConnection);
|
||||
// if (getActiveDisplayPlugin()->isActive()) {
|
||||
// getActiveDisplayPlugin()->deactivate();
|
||||
// }
|
||||
// Quest only supports one plugin which can't be deactivated currently
|
||||
#if !defined(ANDROID_APP_QUEST_INTERFACE)
|
||||
if (getActiveDisplayPlugin()->isActive()) {
|
||||
getActiveDisplayPlugin()->deactivate();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Application::enterForeground() {
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||
"start", Qt::BlockingQueuedConnection);
|
||||
// if (!getActiveDisplayPlugin() || getActiveDisplayPlugin()->isActive() || !getActiveDisplayPlugin()->activate()) {
|
||||
// qWarning() << "Could not re-activate display plugin";
|
||||
// }
|
||||
// Quest only supports one plugin which can't be deactivated currently
|
||||
#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>();
|
||||
nodeList->setSendDomainServerCheckInEnabled(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue