mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 17:30:37 +02:00
Merge pull request #10242 from zzmp/fix/display-log
Send changed_display_mode after it changes
This commit is contained in:
commit
d2bfcce3f7
1 changed files with 9 additions and 11 deletions
|
@ -6759,11 +6759,6 @@ void Application::updateDisplayMode() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserActivityLogger::getInstance().logAction("changed_display_mode", {
|
|
||||||
{ "previous_display_mode", _displayPlugin ? _displayPlugin->getName() : "" },
|
|
||||||
{ "display_mode", newDisplayPlugin ? newDisplayPlugin->getName() : "" }
|
|
||||||
});
|
|
||||||
|
|
||||||
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||||
|
|
||||||
// Make the switch atomic from the perspective of other threads
|
// Make the switch atomic from the perspective of other threads
|
||||||
|
@ -6818,13 +6813,16 @@ void Application::updateDisplayMode() {
|
||||||
offscreenUi->getDesktop()->setProperty("repositionLocked", wasRepositionLocked);
|
offscreenUi->getDesktop()->setProperty("repositionLocked", wasRepositionLocked);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit activeDisplayPluginChanged();
|
bool isHmd = _displayPlugin->isHmd();
|
||||||
|
qCDebug(interfaceapp) << "Entering into" << (isHmd ? "HMD" : "Desktop") << "Mode";
|
||||||
|
|
||||||
if (_displayPlugin->isHmd()) {
|
// Only log/emit after a successful change
|
||||||
qCDebug(interfaceapp) << "Entering into HMD Mode";
|
UserActivityLogger::getInstance().logAction("changed_display_mode", {
|
||||||
} else {
|
{ "previous_display_mode", _displayPlugin ? _displayPlugin->getName() : "" },
|
||||||
qCDebug(interfaceapp) << "Entering into Desktop Mode";
|
{ "display_mode", newDisplayPlugin ? newDisplayPlugin->getName() : "" },
|
||||||
}
|
{ "hmd", isHmd }
|
||||||
|
});
|
||||||
|
emit activeDisplayPluginChanged();
|
||||||
|
|
||||||
// reset the avatar, to set head and hand palms back to a reasonable default pose.
|
// reset the avatar, to set head and hand palms back to a reasonable default pose.
|
||||||
getMyAvatar()->reset(false);
|
getMyAvatar()->reset(false);
|
||||||
|
|
Loading…
Reference in a new issue