mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 00:43:30 +02:00
OpenVR display mode will automatically switch you to standing mode on activation, switch off on deactivation
This commit is contained in:
parent
505ef4c5cc
commit
8833d7b67e
1 changed files with 6 additions and 0 deletions
|
@ -31,6 +31,8 @@ Q_LOGGING_CATEGORY(displayplugins, "hifi.displayplugins")
|
|||
|
||||
const QString OpenVrDisplayPlugin::NAME("OpenVR (Vive)");
|
||||
|
||||
const QString StandingHMDSensorMode = "Standing HMD Sensor Mode"; // this probably shouldn't be hardcoded here
|
||||
|
||||
const QString & OpenVrDisplayPlugin::getName() const {
|
||||
return NAME;
|
||||
}
|
||||
|
@ -80,6 +82,8 @@ bool OpenVrDisplayPlugin::isSupported() const {
|
|||
}
|
||||
|
||||
void OpenVrDisplayPlugin::activate(PluginContainer * container) {
|
||||
container->setIsOptionChecked(StandingHMDSensorMode, true);
|
||||
|
||||
hmdRefCount++;
|
||||
vr::HmdError eError = vr::HmdError_None;
|
||||
if (!_hmd) {
|
||||
|
@ -121,6 +125,8 @@ void OpenVrDisplayPlugin::activate(PluginContainer * container) {
|
|||
}
|
||||
|
||||
void OpenVrDisplayPlugin::deactivate(PluginContainer* container) {
|
||||
container->setIsOptionChecked(StandingHMDSensorMode, false);
|
||||
|
||||
hmdRefCount--;
|
||||
|
||||
if (hmdRefCount == 0 && _hmd) {
|
||||
|
|
Loading…
Reference in a new issue