CenterMarker Rotation Fix + Misc (#458)
* add native chaperone option * refactored overlaywrapper error handling * added reset all settings * added reset all settings option * clarified driver bounds language * fixed naming schema of turn settings * fixed qml issue * marked errors in settings * fixed rotation of center marker and cleaned up * ci test * removed debugging code * fixed comment * fixed rotation.... made messy * fixed crash when centermarker new was on at launch * added settings to scroll view * fixed some initialization issues w/ center marker and some race conditions * updated Documentation to be more correct/concise about openGL rendering Information issue 457 * changed default behaviour of chaperone bounds to be un-checked to be consistant w/ other settings (default is unchecked) * cleaned up code around centermarker overlay * removed unused variables, changed scope of some existing * code naming cleanup * more rename * updated Version strings for 5.1.1 release * updated string to be more concise
This commit is contained in:
@@ -510,9 +510,11 @@ Full build instructions can be found [here](docs/building_for_linux.md).
|
|||||||
|
|
||||||
# Common Issues:
|
# Common Issues:
|
||||||
|
|
||||||
|
|
||||||
- **Issue:** Upon clicking ADV-Settings icon no page shows up.
|
- **Issue:** Upon clicking ADV-Settings icon no page shows up.
|
||||||
- **Cause:** related to multiple GPU systems (and specifically nvidia), and ALVR
|
- **Cause:** related to multiple GPU systems Displaying OpenGL on low power GPU first (IGPU's primarily) [some programs such as alvr may also cause this issue]
|
||||||
- **Solution:** go to Nvidia Control Panel -> manage 3D settings -> add Advanced Settings, and force the vr gpu for it.
|
- **Solution for Nvidia GPU's:** go to Nvidia Control Panel -> manage 3D settings -> Program Settings -> add Advanced Settings, and change `OpenGL Rendering GPU` to the GPU your VR is connected to.
|
||||||
|
- **Solution for Windows (1803+):** go to Settings -> System -> Display -> Select `Classic App` and Browse for `AdvancedSettings.exe` -> Click Options -> Select High Performance
|
||||||
|
|
||||||
- **Issue:** Snap back when using motion controls with WMR headset
|
- **Issue:** Snap back when using motion controls with WMR headset
|
||||||
- **Cause:** WMR boundary off, or set up for standing only.
|
- **Cause:** WMR boundary off, or set up for standing only.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
5.1.0-dev
|
5.1.1-release
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "utils/setup.h"
|
#include "utils/setup.h"
|
||||||
#include "settings/settings.h"
|
#include "settings/settings.h"
|
||||||
|
#include "openvr/ovr_settings_wrapper.h"
|
||||||
|
|
||||||
INITIALIZE_EASYLOGGINGPP
|
INITIALIZE_EASYLOGGINGPP
|
||||||
|
|
||||||
@@ -109,6 +110,11 @@ int main( int argc, char* argv[] )
|
|||||||
qobject_cast<QQuickItem*>( quickObj )->height() ) );
|
qobject_cast<QQuickItem*>( quickObj )->height() ) );
|
||||||
m_pWindow->show();
|
m_pWindow->show();
|
||||||
}
|
}
|
||||||
|
if ( commandLineArgs.resetSettings )
|
||||||
|
{
|
||||||
|
// resets all settings if called
|
||||||
|
ovr_settings_wrapper::resetAllSettings();
|
||||||
|
}
|
||||||
|
|
||||||
return mainEventLoop.exec();
|
return mainEventLoop.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,7 @@ OverlayError createOverlay( const std::string overlayKey,
|
|||||||
{
|
{
|
||||||
vr::VROverlayError oError = vr::VROverlay()->CreateOverlay(
|
vr::VROverlayError oError = vr::VROverlay()->CreateOverlay(
|
||||||
overlayKey.c_str(), overlayName.c_str(), overlayHandle );
|
overlayKey.c_str(), overlayName.c_str(), overlayHandle );
|
||||||
if ( oError == vr::VROverlayError_None )
|
if ( oError != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "Could not create overlay: " << overlayName
|
LOG( ERROR ) << "Could not create overlay: " << overlayName
|
||||||
<< "because "
|
<< "because "
|
||||||
@@ -21,6 +17,7 @@ OverlayError createOverlay( const std::string overlayKey,
|
|||||||
<< " " << customErrorMsg;
|
<< " " << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayError setOverlayColor( vr::VROverlayHandle_t overlayHandle,
|
OverlayError setOverlayColor( vr::VROverlayHandle_t overlayHandle,
|
||||||
@@ -31,11 +28,7 @@ OverlayError setOverlayColor( vr::VROverlayHandle_t overlayHandle,
|
|||||||
{
|
{
|
||||||
vr::VROverlayError oError
|
vr::VROverlayError oError
|
||||||
= vr::VROverlay()->SetOverlayColor( overlayHandle, red, green, blue );
|
= vr::VROverlay()->SetOverlayColor( overlayHandle, red, green, blue );
|
||||||
if ( oError == vr::VROverlayError_None )
|
if ( oError != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "Error setting Overlay Color For "
|
LOG( ERROR ) << "Error setting Overlay Color For "
|
||||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||||
@@ -43,6 +36,7 @@ OverlayError setOverlayColor( vr::VROverlayHandle_t overlayHandle,
|
|||||||
<< " " << customErrorMsg;
|
<< " " << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayError setOverlayAlpha( vr::VROverlayHandle_t overlayHandle,
|
OverlayError setOverlayAlpha( vr::VROverlayHandle_t overlayHandle,
|
||||||
@@ -51,11 +45,7 @@ OverlayError setOverlayAlpha( vr::VROverlayHandle_t overlayHandle,
|
|||||||
{
|
{
|
||||||
vr::VROverlayError oError
|
vr::VROverlayError oError
|
||||||
= vr::VROverlay()->SetOverlayAlpha( overlayHandle, alpha );
|
= vr::VROverlay()->SetOverlayAlpha( overlayHandle, alpha );
|
||||||
if ( oError == vr::VROverlayError_None )
|
if ( oError != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "Error setting Overlay Alpha For "
|
LOG( ERROR ) << "Error setting Overlay Alpha For "
|
||||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||||
@@ -63,6 +53,7 @@ OverlayError setOverlayAlpha( vr::VROverlayHandle_t overlayHandle,
|
|||||||
<< " " << customErrorMsg;
|
<< " " << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayError setOverlayWidthInMeters( vr::VROverlayHandle_t overlayHandle,
|
OverlayError setOverlayWidthInMeters( vr::VROverlayHandle_t overlayHandle,
|
||||||
@@ -71,11 +62,7 @@ OverlayError setOverlayWidthInMeters( vr::VROverlayHandle_t overlayHandle,
|
|||||||
{
|
{
|
||||||
vr::VROverlayError oError = vr::VROverlay()->SetOverlayWidthInMeters(
|
vr::VROverlayError oError = vr::VROverlay()->SetOverlayWidthInMeters(
|
||||||
overlayHandle, widthInMeters );
|
overlayHandle, widthInMeters );
|
||||||
if ( oError == vr::VROverlayError_None )
|
if ( oError != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "Error setting overlay width For "
|
LOG( ERROR ) << "Error setting overlay width For "
|
||||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||||
@@ -83,6 +70,7 @@ OverlayError setOverlayWidthInMeters( vr::VROverlayHandle_t overlayHandle,
|
|||||||
<< " " << customErrorMsg;
|
<< " " << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayError setOverlayFromFile( vr::VROverlayHandle_t overlayHandle,
|
OverlayError setOverlayFromFile( vr::VROverlayHandle_t overlayHandle,
|
||||||
@@ -91,29 +79,23 @@ OverlayError setOverlayFromFile( vr::VROverlayHandle_t overlayHandle,
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
const auto overlayPath = paths::binaryDirectoryFindFile( fileName );
|
const auto overlayPath = paths::binaryDirectoryFindFile( fileName );
|
||||||
if ( overlayPath.has_value() )
|
if ( !overlayPath.has_value() )
|
||||||
{
|
|
||||||
vr::VROverlayError oError = vr::VROverlay()->SetOverlayFromFile(
|
|
||||||
overlayHandle, overlayPath->c_str() );
|
|
||||||
if ( oError == vr::VROverlayError_None )
|
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LOG( ERROR )
|
|
||||||
<< "Error setting Overlay from file For "
|
|
||||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
|
||||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
|
||||||
<< " " << customErrorMsg;
|
|
||||||
return OverlayError::UndefinedError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "File not Found: " << fileName << customErrorMsg;
|
LOG( ERROR ) << "File not Found: " << fileName << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
vr::VROverlayError oError = vr::VROverlay()->SetOverlayFromFile(
|
||||||
|
overlayHandle, overlayPath->c_str() );
|
||||||
|
if ( oError != vr::VROverlayError_None )
|
||||||
|
{
|
||||||
|
LOG( ERROR ) << "Error setting Overlay from file For "
|
||||||
|
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||||
|
<< vr::VROverlay()->GetOverlayErrorNameFromEnum(
|
||||||
|
oError )
|
||||||
|
<< " " << customErrorMsg;
|
||||||
|
return OverlayError::UndefinedError;
|
||||||
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,11 +103,7 @@ OverlayError showOverlay( vr::VROverlayHandle_t overlayHandle,
|
|||||||
std::string customErrorMsg )
|
std::string customErrorMsg )
|
||||||
{
|
{
|
||||||
vr::VROverlayError oError = vr::VROverlay()->ShowOverlay( overlayHandle );
|
vr::VROverlayError oError = vr::VROverlay()->ShowOverlay( overlayHandle );
|
||||||
if ( oError == vr::VROverlayError_None )
|
if ( oError != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "Error showing overlay For "
|
LOG( ERROR ) << "Error showing overlay For "
|
||||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||||
@@ -133,17 +111,14 @@ OverlayError showOverlay( vr::VROverlayHandle_t overlayHandle,
|
|||||||
<< " " << customErrorMsg;
|
<< " " << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayError hideOverlay( vr::VROverlayHandle_t overlayHandle,
|
OverlayError hideOverlay( vr::VROverlayHandle_t overlayHandle,
|
||||||
std::string customErrorMsg )
|
std::string customErrorMsg )
|
||||||
{
|
{
|
||||||
vr::VROverlayError oError = vr::VROverlay()->HideOverlay( overlayHandle );
|
vr::VROverlayError oError = vr::VROverlay()->HideOverlay( overlayHandle );
|
||||||
if ( oError == vr::VROverlayError_None )
|
if ( oError != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "Error hiding overlay For "
|
LOG( ERROR ) << "Error hiding overlay For "
|
||||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||||
@@ -151,6 +126,7 @@ OverlayError hideOverlay( vr::VROverlayHandle_t overlayHandle,
|
|||||||
<< " " << customErrorMsg;
|
<< " " << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayError setOverlayTransformAbsolute(
|
OverlayError setOverlayTransformAbsolute(
|
||||||
@@ -161,11 +137,7 @@ OverlayError setOverlayTransformAbsolute(
|
|||||||
{
|
{
|
||||||
vr::VROverlayError oError = vr::VROverlay()->SetOverlayTransformAbsolute(
|
vr::VROverlayError oError = vr::VROverlay()->SetOverlayTransformAbsolute(
|
||||||
overlayHandle, trackingOrigin, trackingOriginToOverlayTransform );
|
overlayHandle, trackingOrigin, trackingOriginToOverlayTransform );
|
||||||
if ( oError == vr::VROverlayError_None )
|
if ( oError != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return OverlayError::NoError;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
LOG( ERROR ) << "Error setting Overlay Position For "
|
LOG( ERROR ) << "Error setting Overlay Position For "
|
||||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||||
@@ -173,6 +145,7 @@ OverlayError setOverlayTransformAbsolute(
|
|||||||
<< " " << customErrorMsg;
|
<< " " << customErrorMsg;
|
||||||
return OverlayError::UndefinedError;
|
return OverlayError::UndefinedError;
|
||||||
}
|
}
|
||||||
|
return OverlayError::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string getOverlayKey( vr::VROverlayHandle_t overlayHandle )
|
std::string getOverlayKey( vr::VROverlayHandle_t overlayHandle )
|
||||||
@@ -184,16 +157,13 @@ std::string getOverlayKey( vr::VROverlayHandle_t overlayHandle )
|
|||||||
vr::VROverlay()->GetOverlayKey(
|
vr::VROverlay()->GetOverlayKey(
|
||||||
overlayHandle, cStringOut, bufferMax, &oErrorOut );
|
overlayHandle, cStringOut, bufferMax, &oErrorOut );
|
||||||
std::string output = cStringOut;
|
std::string output = cStringOut;
|
||||||
if ( oErrorOut == vr::VROverlayError_None )
|
if ( oErrorOut != vr::VROverlayError_None )
|
||||||
{
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
std::string errorName
|
std::string errorName
|
||||||
= vr::VROverlay()->GetOverlayErrorNameFromEnum( oErrorOut );
|
= vr::VROverlay()->GetOverlayErrorNameFromEnum( oErrorOut );
|
||||||
return ( "can't get name:" + errorName );
|
return ( "can't get name:" + errorName );
|
||||||
}
|
}
|
||||||
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ovr_overlay_wrapper
|
} // namespace ovr_overlay_wrapper
|
||||||
|
|||||||
@@ -145,4 +145,15 @@ SettingsError removeKeyInSection( std::string section,
|
|||||||
return handleErrors( settingsKey, error, customErrorMsg );
|
return handleErrors( settingsKey, error, customErrorMsg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resetAllSettings()
|
||||||
|
{
|
||||||
|
// these should cover all sections we touch and should be added to if we
|
||||||
|
// touch more or they change
|
||||||
|
removeSection( vr::k_pch_SteamVR_Section, "While Resetting All" );
|
||||||
|
removeSection( vr::k_pch_Notifications_Section, "While Resetting All" );
|
||||||
|
removeSection( vr::k_pch_CollisionBounds_Section, "While Resetting All" );
|
||||||
|
removeSection( vr::k_pch_Camera_Section, "While Resetting All" );
|
||||||
|
removeSection( vr::k_pch_audio_Section, "While Resetting All" );
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ovr_settings_wrapper
|
} // namespace ovr_settings_wrapper
|
||||||
|
|||||||
@@ -63,4 +63,6 @@ SettingsError removeKeyInSection( std::string section,
|
|||||||
SettingsError handleErrors( std::string settingsKey,
|
SettingsError handleErrors( std::string settingsKey,
|
||||||
vr::EVRSettingsError,
|
vr::EVRSettingsError,
|
||||||
std::string customErrorMsg );
|
std::string customErrorMsg );
|
||||||
|
|
||||||
|
void resetAllSettings();
|
||||||
} // namespace ovr_settings_wrapper
|
} // namespace ovr_settings_wrapper
|
||||||
|
|||||||
+222
-206
@@ -1,5 +1,6 @@
|
|||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import ovras.advsettings 1.0
|
import ovras.advsettings 1.0
|
||||||
import "common"
|
import "common"
|
||||||
@@ -7,233 +8,248 @@ import "common"
|
|||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
headerText: "Application Settings"
|
headerText: "Application Settings"
|
||||||
|
|
||||||
content: ColumnLayout {
|
content: ScrollView{
|
||||||
spacing: 18
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||||
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||||
|
|
||||||
MyToggleButton {
|
ColumnLayout {
|
||||||
id: settingsAutoStartToggle
|
spacing: 18
|
||||||
text: "Autostart"
|
|
||||||
onCheckedChanged: {
|
|
||||||
SettingsTabController.setAutoStartEnabled(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: allowExternalEditsToggle
|
|
||||||
text: "Allow External App Chaperone Edits (Danger)"
|
|
||||||
onCheckedChanged: {
|
|
||||||
MoveCenterTabController.setAllowExternalEdits(checked, true)
|
|
||||||
seatedOldExternalWarning.visible = checked && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: oldStyleMotionToggle
|
|
||||||
text: "Old-Style Motion (per-frame disk writes)"
|
|
||||||
onCheckedChanged: {
|
|
||||||
MoveCenterTabController.setOldStyleMotion(checked, true)
|
|
||||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && checked && MoveCenterTabController.enableSeatedMotion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: universeCenteredRotationToggle
|
|
||||||
text: "Universe-Centered Rotation (Disables HMD Centering)"
|
|
||||||
onCheckedChanged: {
|
|
||||||
MoveCenterTabController.setUniverseCenteredRotation(checked, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: enableSeatedMotionToggle
|
|
||||||
text: "Enable Motion Features When in Seated Mode (Experimental)"
|
|
||||||
onCheckedChanged: {
|
|
||||||
MoveCenterTabController.setEnableSeatedMotion(checked, true)
|
|
||||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && checked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: disableCrashRecoveryToggle
|
|
||||||
text: "Disable Automatic Crash Recovery of Chaperone Config"
|
|
||||||
onCheckedChanged: {
|
|
||||||
OverlayController.setCrashRecoveryDisabled(checked, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: disableVersionCheckToggle
|
|
||||||
text: "Disable Notification of Newer Version Availability"
|
|
||||||
onCheckedChanged: {
|
|
||||||
OverlayController.setDisableVersionCheck(checked, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
MyToggleButton {
|
MyToggleButton {
|
||||||
id: vsyncDisabledToggle
|
id: settingsAutoStartToggle
|
||||||
text: "Disable App Vsync"
|
text: "Autostart"
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
OverlayController.setVsyncDisabled(checked, true)
|
SettingsTabController.setAutoStartEnabled(checked, false)
|
||||||
customTickRateText.visible = checked
|
|
||||||
customTickRateLabel.visible = checked
|
|
||||||
customTickRateMsLabel.visible = checked
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MyText {
|
|
||||||
id: customTickRateLabel
|
|
||||||
text: "Custom Tick Rate: "
|
|
||||||
horizontalAlignment: Text.AlignRight
|
|
||||||
Layout.leftMargin: 20
|
|
||||||
Layout.rightMargin: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
MyTextField {
|
|
||||||
id: customTickRateText
|
|
||||||
text: "20"
|
|
||||||
keyBoardUID: 1001
|
|
||||||
Layout.preferredWidth: 140
|
|
||||||
Layout.leftMargin: 10
|
|
||||||
Layout.rightMargin: 1
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
function onInputEvent(input) {
|
|
||||||
var val = parseInt(input, 10)
|
|
||||||
if (!isNaN(val)) {
|
|
||||||
OverlayController.customTickRateMs = val
|
|
||||||
text = OverlayController.customTickRateMs
|
|
||||||
} else {
|
|
||||||
text = OverlayController.customTickRateMs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyText {
|
|
||||||
id: customTickRateMsLabel
|
|
||||||
text: "ms"
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
Layout.leftMargin: 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
id: debugStateRow
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
MyText {
|
|
||||||
id: debugStateLabel
|
|
||||||
text: "Debug State: "
|
|
||||||
horizontalAlignment: Text.AlignRight
|
|
||||||
Layout.leftMargin: 20
|
|
||||||
Layout.rightMargin: 2
|
|
||||||
}
|
|
||||||
|
|
||||||
MyTextField {
|
|
||||||
id: debugStateText
|
|
||||||
text: "0"
|
|
||||||
keyBoardUID: 1002
|
|
||||||
Layout.preferredWidth: 140
|
|
||||||
Layout.leftMargin: 10
|
|
||||||
Layout.rightMargin: 1
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
function onInputEvent(input) {
|
|
||||||
var val = parseInt(input, 10)
|
|
||||||
if (!isNaN(val)) {
|
|
||||||
OverlayController.debugState = val
|
|
||||||
text = OverlayController.debugState
|
|
||||||
} else {
|
|
||||||
text = OverlayController.debugState
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout{
|
|
||||||
|
|
||||||
MyText {
|
|
||||||
id: seatedOldExternalWarning
|
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
font.pointSize: 20
|
|
||||||
color: "#FFA500"
|
|
||||||
text: "WARNING: 'Allow External App Chaperone Edits' + 'Old-Style Motion' + 'Enable Motion Features When in Seated Mode' active together may cause space center misalignment. Load the «Autosaved Profile» in the 'Chaperone' tab to fix."
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
Layout.leftMargin: 20
|
|
||||||
Layout.rightMargin: 20
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout{
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
MyPushButton {
|
|
||||||
id: shutdownButton
|
|
||||||
Layout.preferredWidth: 250
|
|
||||||
text: "Shutdown OVRAS"
|
|
||||||
onClicked: {
|
|
||||||
OverlayController.exitApp()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
MyToggleButton {
|
MyToggleButton {
|
||||||
// set visible to true here in builds when we need a debug toggle checkbox, otherwise false when on master branch.
|
id: allowExternalEditsToggle
|
||||||
visible: false
|
text: "Allow External App Chaperone Edits (Danger)"
|
||||||
id: debugToggle
|
|
||||||
text: "Debug"
|
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
OverlayController.setEnableDebug(checked, true)
|
MoveCenterTabController.setAllowExternalEdits(checked, true)
|
||||||
|
seatedOldExternalWarning.visible = checked && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
MyToggleButton {
|
||||||
|
id: oldStyleMotionToggle
|
||||||
|
text: "Old-Style Motion (per-frame disk writes)"
|
||||||
|
onCheckedChanged: {
|
||||||
|
MoveCenterTabController.setOldStyleMotion(checked, true)
|
||||||
|
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && checked && MoveCenterTabController.enableSeatedMotion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
MyToggleButton {
|
||||||
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
|
id: universeCenteredRotationToggle
|
||||||
|
text: "Universe-Centered Rotation (Disables HMD Centering)"
|
||||||
|
onCheckedChanged: {
|
||||||
|
MoveCenterTabController.setUniverseCenteredRotation(checked, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
|
MyToggleButton {
|
||||||
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
|
id: enableSeatedMotionToggle
|
||||||
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
|
text: "Enable Motion Features When in Seated Mode (Experimental)"
|
||||||
enableSeatedMotionToggle.checked = MoveCenterTabController.enableSeatedMotion
|
onCheckedChanged: {
|
||||||
|
MoveCenterTabController.setEnableSeatedMotion(checked, true)
|
||||||
|
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
disableCrashRecoveryToggle.checked = OverlayController.crashRecoveryDisabled
|
MyToggleButton {
|
||||||
customTickRateText.text = OverlayController.customTickRateMs
|
id: disableCrashRecoveryToggle
|
||||||
vsyncDisabledToggle.checked = OverlayController.vsyncDisabled
|
text: "Disable Automatic Crash Recovery of Chaperone Config"
|
||||||
customTickRateText.visible = vsyncDisabledToggle.checked
|
onCheckedChanged: {
|
||||||
customTickRateLabel.visible = vsyncDisabledToggle.checked
|
OverlayController.setCrashRecoveryDisabled(checked, true)
|
||||||
customTickRateMsLabel.visible = vsyncDisabledToggle.checked
|
}
|
||||||
debugStateRow.visible = OverlayController.enableDebug
|
}
|
||||||
debugStateText.text = OverlayController.debugState
|
|
||||||
disableVersionCheckToggle.checked = OverlayController.disableVersionCheck
|
|
||||||
|
|
||||||
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
MyToggleButton {
|
||||||
}
|
id: disableVersionCheckToggle
|
||||||
|
text: "Disable Notification of Newer Version Availability"
|
||||||
|
onCheckedChanged: {
|
||||||
|
OverlayController.setDisableVersionCheck(checked, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: nativeChaperoneToggleButton
|
||||||
|
text: "Force Use SteamVR Chaperone (experimental + SteamVR restart required)"
|
||||||
|
onCheckedChanged: {
|
||||||
|
SettingsTabController.setNativeChaperoneToggle(this.checked, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
MyToggleButton {
|
||||||
|
id: vsyncDisabledToggle
|
||||||
|
text: "Disable App Vsync"
|
||||||
|
onCheckedChanged: {
|
||||||
|
OverlayController.setVsyncDisabled(checked, true)
|
||||||
|
customTickRateText.visible = checked
|
||||||
|
customTickRateLabel.visible = checked
|
||||||
|
customTickRateMsLabel.visible = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
id: customTickRateLabel
|
||||||
|
text: "Custom Tick Rate: "
|
||||||
|
horizontalAlignment: Text.AlignRight
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
Layout.rightMargin: 2
|
||||||
|
}
|
||||||
|
|
||||||
|
MyTextField {
|
||||||
|
id: customTickRateText
|
||||||
|
text: "20"
|
||||||
|
keyBoardUID: 1001
|
||||||
|
Layout.preferredWidth: 140
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
Layout.rightMargin: 1
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
function onInputEvent(input) {
|
||||||
|
var val = parseInt(input, 10)
|
||||||
|
if (!isNaN(val)) {
|
||||||
|
OverlayController.customTickRateMs = val
|
||||||
|
text = OverlayController.customTickRateMs
|
||||||
|
} else {
|
||||||
|
text = OverlayController.customTickRateMs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
id: customTickRateMsLabel
|
||||||
|
text: "ms"
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
Layout.leftMargin: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: debugStateRow
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
id: debugStateLabel
|
||||||
|
text: "Debug State: "
|
||||||
|
horizontalAlignment: Text.AlignRight
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
Layout.rightMargin: 2
|
||||||
|
}
|
||||||
|
|
||||||
|
MyTextField {
|
||||||
|
id: debugStateText
|
||||||
|
text: "0"
|
||||||
|
keyBoardUID: 1002
|
||||||
|
Layout.preferredWidth: 140
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
Layout.rightMargin: 1
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
function onInputEvent(input) {
|
||||||
|
var val = parseInt(input, 10)
|
||||||
|
if (!isNaN(val)) {
|
||||||
|
OverlayController.debugState = val
|
||||||
|
text = OverlayController.debugState
|
||||||
|
} else {
|
||||||
|
text = OverlayController.debugState
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout{
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
id: seatedOldExternalWarning
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pointSize: 20
|
||||||
|
color: "#FFA500"
|
||||||
|
text: "WARNING: 'Allow External App Chaperone Edits' + 'Old-Style Motion' + 'Enable Motion Features When in Seated Mode' active together may cause space center misalignment. Load the «Autosaved Profile» in the 'Chaperone' tab to fix."
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
Layout.rightMargin: 20
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout{
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
id: shutdownButton
|
||||||
|
Layout.preferredWidth: 250
|
||||||
|
text: "Shutdown OVRAS"
|
||||||
|
onClicked: {
|
||||||
|
OverlayController.exitApp()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MyToggleButton {
|
||||||
|
// set visible to true here in builds when we need a debug toggle checkbox, otherwise false when on master branch.
|
||||||
|
visible: false
|
||||||
|
id: debugToggle
|
||||||
|
text: "Debug"
|
||||||
|
onCheckedChanged: {
|
||||||
|
OverlayController.setEnableDebug(checked, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} // end column
|
||||||
|
Component.onCompleted: {
|
||||||
|
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
|
||||||
|
|
||||||
|
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
|
||||||
|
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
|
||||||
|
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
|
||||||
|
enableSeatedMotionToggle.checked = MoveCenterTabController.enableSeatedMotion
|
||||||
|
|
||||||
|
disableCrashRecoveryToggle.checked = OverlayController.crashRecoveryDisabled
|
||||||
|
customTickRateText.text = OverlayController.customTickRateMs
|
||||||
|
vsyncDisabledToggle.checked = OverlayController.vsyncDisabled
|
||||||
|
customTickRateText.visible = vsyncDisabledToggle.checked
|
||||||
|
customTickRateLabel.visible = vsyncDisabledToggle.checked
|
||||||
|
customTickRateMsLabel.visible = vsyncDisabledToggle.checked
|
||||||
|
debugStateRow.visible = OverlayController.enableDebug
|
||||||
|
debugStateText.text = OverlayController.debugState
|
||||||
|
disableVersionCheckToggle.checked = OverlayController.disableVersionCheck
|
||||||
|
nativeChaperoneToggleButton.checked = SettingsTabController.nativeChaperoneToggle
|
||||||
|
|
||||||
|
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: SettingsTabController
|
target: SettingsTabController
|
||||||
onAutoStartEnabledChanged: {
|
onAutoStartEnabledChanged: {
|
||||||
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
|
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
|
||||||
}
|
}
|
||||||
|
onNativeChaperoneToggleChanged:{
|
||||||
|
nativeChaperoneToggleButton.checked = SettingsTabController.nativeChaperoneToggle
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
@@ -282,5 +298,5 @@ MyStackViewPage {
|
|||||||
disableVersionCheckToggle.checked = OverlayController.disableVersionCheck
|
disableVersionCheckToggle.checked = OverlayController.disableVersionCheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // end scroll
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -556,6 +556,8 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
chaperoneHeightText.text = h
|
chaperoneHeightText.text = h
|
||||||
chaperoneCenterMarkerToggle.checked = ChaperoneTabController.centerMarkerNew
|
chaperoneCenterMarkerToggle.checked = ChaperoneTabController.centerMarkerNew
|
||||||
|
//We Need a Set call on init in order to display the overlay!
|
||||||
|
ChaperoneTabController.setCenterMarkerNew(chaperoneCenterMarkerToggle.checked);
|
||||||
chaperonePlaySpaceToggle.checked = ChaperoneTabController.playSpaceMarker
|
chaperonePlaySpaceToggle.checked = ChaperoneTabController.playSpaceMarker
|
||||||
chaperoneForceBoundsToggle.checked = ChaperoneTabController.forceBounds
|
chaperoneForceBoundsToggle.checked = ChaperoneTabController.forceBounds
|
||||||
chaperoneDisableChaperone.checked = ChaperoneTabController.disableChaperone
|
chaperoneDisableChaperone.checked = ChaperoneTabController.disableChaperone
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ GroupBox {
|
|||||||
chaperoneFloorToggleBtn.checked = ChaperoneTabController.chaperoneFloorToggle
|
chaperoneFloorToggleBtn.checked = ChaperoneTabController.chaperoneFloorToggle
|
||||||
}
|
}
|
||||||
onCenterMarkerChanged:{
|
onCenterMarkerChanged:{
|
||||||
legacyCenterMarkerbtn.checked = ChaperoneTabController.centermarker
|
legacyCenterMarkerbtn.checked = ChaperoneTabController.centerMarker
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ GroupBox {
|
|||||||
|
|
||||||
label: MyText {
|
label: MyText {
|
||||||
leftPadding: 10
|
leftPadding: 10
|
||||||
text: "Auto-turn (aka infinite walk)"
|
text: "Auto-Turn (for discrete redirected walking)"
|
||||||
bottomPadding: -10
|
bottomPadding: -10
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ GroupBox {
|
|||||||
|
|
||||||
label: MyText {
|
label: MyText {
|
||||||
leftPadding: 10
|
leftPadding: 10
|
||||||
text: "Redirected Walking"
|
text: "Vestibular Motion (for continuous redirected walking)"
|
||||||
bottomPadding: -10
|
bottomPadding: -10
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ GroupBox {
|
|||||||
|
|
||||||
label: MyText {
|
label: MyText {
|
||||||
leftPadding: 10
|
leftPadding: 10
|
||||||
text: "Space Turn"
|
text: "Space Turn (for manual redirected walking)"
|
||||||
bottomPadding: -10
|
bottomPadding: -10
|
||||||
}
|
}
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
|||||||
@@ -426,18 +426,26 @@ private:
|
|||||||
QtInfo{ "colorBlueNew" },
|
QtInfo{ "colorBlueNew" },
|
||||||
1.0 },
|
1.0 },
|
||||||
|
|
||||||
|
// TODO BUG [breaking change] should be in Chaperone Settings Not Video
|
||||||
|
// fix @ breaking change
|
||||||
DoubleSettingValue{ DoubleSetting::CHAPERONE_switchToBeginnerDistance,
|
DoubleSettingValue{ DoubleSetting::CHAPERONE_switchToBeginnerDistance,
|
||||||
SettingCategory::Video,
|
SettingCategory::Video,
|
||||||
QtInfo{ "chaperoneSwitchToBeginnerDistance" },
|
QtInfo{ "chaperoneSwitchToBeginnerDistance" },
|
||||||
0.5 },
|
0.5 },
|
||||||
|
// TODO BUG [breaking change] should be in Chaperone Settings Not Video
|
||||||
|
// fix @ breaking change
|
||||||
DoubleSettingValue{ DoubleSetting::CHAPERONE_hapticFeedbackDistance,
|
DoubleSettingValue{ DoubleSetting::CHAPERONE_hapticFeedbackDistance,
|
||||||
SettingCategory::Video,
|
SettingCategory::Video,
|
||||||
QtInfo{ "chaperoneHapticFeedbackDistance" },
|
QtInfo{ "chaperoneHapticFeedbackDistance" },
|
||||||
0.5 },
|
0.5 },
|
||||||
|
// TODO BUG [breaking change] should be in Chaperone Settings Not Video
|
||||||
|
// fix @ breaking change
|
||||||
DoubleSettingValue{ DoubleSetting::CHAPERONE_alarmSoundDistance,
|
DoubleSettingValue{ DoubleSetting::CHAPERONE_alarmSoundDistance,
|
||||||
SettingCategory::Video,
|
SettingCategory::Video,
|
||||||
QtInfo{ "chaperoneAlarmSoundDistance" },
|
QtInfo{ "chaperoneAlarmSoundDistance" },
|
||||||
0.5 },
|
0.5 },
|
||||||
|
// TODO BUG [breaking change] should be in Chaperone Settings Not Video
|
||||||
|
// fix @ breaking change
|
||||||
DoubleSettingValue{ DoubleSetting::CHAPERONE_showDashboardDistance,
|
DoubleSettingValue{ DoubleSetting::CHAPERONE_showDashboardDistance,
|
||||||
SettingCategory::Video,
|
SettingCategory::Video,
|
||||||
QtInfo{ "chaperoneShowDashboardDistance" },
|
QtInfo{ "chaperoneShowDashboardDistance" },
|
||||||
|
|||||||
@@ -20,17 +20,24 @@ void ChaperoneTabController::initStage1()
|
|||||||
reloadChaperoneProfiles();
|
reloadChaperoneProfiles();
|
||||||
m_chaperoneSettingsUpdateCounter
|
m_chaperoneSettingsUpdateCounter
|
||||||
= utils::adjustUpdateRate( k_chaperoneSettingsUpdateCounter );
|
= utils::adjustUpdateRate( k_chaperoneSettingsUpdateCounter );
|
||||||
initFloorOverlay();
|
initCenterMarkerOverlay();
|
||||||
eventLoopTick( m_trackingUniverse, nullptr );
|
eventLoopTick( m_trackingUniverse, nullptr );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChaperoneTabController::initStage2( OverlayController* var_parent )
|
void ChaperoneTabController::initStage2( OverlayController* var_parent )
|
||||||
{
|
{
|
||||||
this->parent = var_parent;
|
this->parent = var_parent;
|
||||||
// Cludge Fix for now, but its not getting called for some reason w/ QML
|
|
||||||
setCenterMarkerNew( centerMarkerNew() );
|
|
||||||
updateChaperoneSettings(); // force one update of OVR saved settings to make
|
updateChaperoneSettings(); // force one update of OVR saved settings to make
|
||||||
// sure our m_ variables are correct
|
// sure our m_ variables are correct
|
||||||
|
// Force call Update Overlay Once, so Default state is in correct location
|
||||||
|
if ( m_centerMarkerOverlayIsInit )
|
||||||
|
{
|
||||||
|
vr::HmdMatrix34_t temp = { { { 1.0f, 0.0f, 0.0f, 0.0f },
|
||||||
|
{ 0.0f, 0.0f, 1.0f, 0.0f },
|
||||||
|
{ 0.0f, -1.0f, 0.0f, 0.0f } } };
|
||||||
|
updateCenterMarkerOverlay( &( temp ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChaperoneTabController::dashboardLoopTick()
|
void ChaperoneTabController::dashboardLoopTick()
|
||||||
@@ -237,13 +244,7 @@ void ChaperoneTabController::eventLoopTick(
|
|||||||
vr::TrackedDevicePose_t* devicePoses )
|
vr::TrackedDevicePose_t* devicePoses )
|
||||||
{
|
{
|
||||||
m_trackingUniverse = universe;
|
m_trackingUniverse = universe;
|
||||||
// Update overlay should only run After move center tab controller is
|
|
||||||
// initialized.
|
|
||||||
// As such this protects it from running during initstage 1.
|
|
||||||
if ( centerMarkerNew() && devicePoses != nullptr )
|
|
||||||
{
|
|
||||||
updateOverlay();
|
|
||||||
}
|
|
||||||
if ( devicePoses )
|
if ( devicePoses )
|
||||||
{
|
{
|
||||||
m_isHMDActive = false;
|
m_isHMDActive = false;
|
||||||
@@ -739,7 +740,7 @@ void ChaperoneTabController::setChaperoneColorR( int value, bool notify )
|
|||||||
vr::k_pch_CollisionBounds_ColorGammaR_Int32,
|
vr::k_pch_CollisionBounds_ColorGammaR_Int32,
|
||||||
m_chaperoneColorR,
|
m_chaperoneColorR,
|
||||||
"" );
|
"" );
|
||||||
updateOverlayColor();
|
updateCenterMarkerOverlayColor();
|
||||||
if ( notify )
|
if ( notify )
|
||||||
{
|
{
|
||||||
emit chaperoneColorRChanged( value );
|
emit chaperoneColorRChanged( value );
|
||||||
@@ -767,7 +768,7 @@ void ChaperoneTabController::setChaperoneColorG( int value, bool notify )
|
|||||||
vr::k_pch_CollisionBounds_ColorGammaG_Int32,
|
vr::k_pch_CollisionBounds_ColorGammaG_Int32,
|
||||||
m_chaperoneColorG,
|
m_chaperoneColorG,
|
||||||
"" );
|
"" );
|
||||||
updateOverlayColor();
|
updateCenterMarkerOverlayColor();
|
||||||
if ( notify )
|
if ( notify )
|
||||||
{
|
{
|
||||||
emit chaperoneColorGChanged( value );
|
emit chaperoneColorGChanged( value );
|
||||||
@@ -795,14 +796,14 @@ void ChaperoneTabController::setChaperoneColorB( int value, bool notify )
|
|||||||
vr::k_pch_CollisionBounds_ColorGammaB_Int32,
|
vr::k_pch_CollisionBounds_ColorGammaB_Int32,
|
||||||
m_chaperoneColorB,
|
m_chaperoneColorB,
|
||||||
"" );
|
"" );
|
||||||
updateOverlayColor();
|
updateCenterMarkerOverlayColor();
|
||||||
if ( notify )
|
if ( notify )
|
||||||
{
|
{
|
||||||
emit chaperoneColorBChanged( value );
|
emit chaperoneColorBChanged( value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void ChaperoneTabController::updateOverlayColor()
|
void ChaperoneTabController::updateCenterMarkerOverlayColor()
|
||||||
{
|
{
|
||||||
float chapColorR = static_cast<float>( m_chaperoneColorR ) / 255.0f;
|
float chapColorR = static_cast<float>( m_chaperoneColorR ) / 255.0f;
|
||||||
float chapColorG = static_cast<float>( m_chaperoneColorG ) / 255.0f;
|
float chapColorG = static_cast<float>( m_chaperoneColorG ) / 255.0f;
|
||||||
@@ -840,10 +841,12 @@ void ChaperoneTabController::setCenterMarkerNew( bool value, bool notify )
|
|||||||
if ( value )
|
if ( value )
|
||||||
{
|
{
|
||||||
ovr_overlay_wrapper::showOverlay( m_chaperoneFloorOverlayHandle );
|
ovr_overlay_wrapper::showOverlay( m_chaperoneFloorOverlayHandle );
|
||||||
|
m_centerMarkerOverlayNeedsUpdate = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ovr_overlay_wrapper::hideOverlay( m_chaperoneFloorOverlayHandle );
|
ovr_overlay_wrapper::hideOverlay( m_chaperoneFloorOverlayHandle );
|
||||||
|
m_centerMarkerOverlayNeedsUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( notify )
|
if ( notify )
|
||||||
@@ -1546,7 +1549,7 @@ void ChaperoneTabController::addRightHapticClick( bool rightHapticClickPressed )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChaperoneTabController::initFloorOverlay()
|
void ChaperoneTabController::initCenterMarkerOverlay()
|
||||||
{
|
{
|
||||||
std::string overlayFloorMarkerKey
|
std::string overlayFloorMarkerKey
|
||||||
= std::string( application_strings::applicationKey ) + ".floormarker";
|
= std::string( application_strings::applicationKey ) + ".floormarker";
|
||||||
@@ -1561,9 +1564,10 @@ void ChaperoneTabController::initFloorOverlay()
|
|||||||
m_chaperoneFloorOverlayHandle, m_floorMarkerFN, "" );
|
m_chaperoneFloorOverlayHandle, m_floorMarkerFN, "" );
|
||||||
ovr_overlay_wrapper::setOverlayWidthInMeters(
|
ovr_overlay_wrapper::setOverlayWidthInMeters(
|
||||||
m_chaperoneFloorOverlayHandle, 0.5f );
|
m_chaperoneFloorOverlayHandle, 0.5f );
|
||||||
updateOverlayColor();
|
updateCenterMarkerOverlayColor();
|
||||||
ovr_overlay_wrapper::setOverlayAlpha(
|
ovr_overlay_wrapper::setOverlayAlpha(
|
||||||
m_chaperoneFloorOverlayHandle, m_visibility, "" );
|
m_chaperoneFloorOverlayHandle, m_visibility, "" );
|
||||||
|
m_centerMarkerOverlayIsInit = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1572,32 +1576,25 @@ void ChaperoneTabController::initFloorOverlay()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChaperoneTabController::updateOverlay()
|
// This Function Is called And Handled In MoveCenterTabController to reduce
|
||||||
|
// un-necessary overhead, as well as consistancy in movement operations
|
||||||
|
// It will be updated Every frame that movement is updated
|
||||||
|
void ChaperoneTabController::updateCenterMarkerOverlay(
|
||||||
|
vr::HmdMatrix34_t* centerPlaySpaceMatrix )
|
||||||
{
|
{
|
||||||
if ( m_trackingUniverse != vr::TrackingUniverseRawAndUncalibrated )
|
if ( m_trackingUniverse != vr::TrackingUniverseRawAndUncalibrated )
|
||||||
{
|
{
|
||||||
float xoff = -( parent->m_moveCenterTabController.offsetX() );
|
|
||||||
float yoff = -( parent->m_moveCenterTabController.offsetY() );
|
|
||||||
float zoff = -( parent->m_moveCenterTabController.offsetZ() );
|
|
||||||
/* Rotation on Y Axis
|
|
||||||
* {cos t, 0, sin t}
|
|
||||||
* {0, 1, 0}
|
|
||||||
* {-sin t, 0 cost t}
|
|
||||||
*/
|
|
||||||
|
|
||||||
vr::HmdMatrix34_t updateTransform = { { { 1.0f, 0.0f, 0.0f, xoff },
|
|
||||||
{ 0.0f, 0.0f, 1.0f, yoff },
|
|
||||||
{ 0.0f, -1.0f, 0.0f, zoff } } };
|
|
||||||
ovr_overlay_wrapper::setOverlayTransformAbsolute(
|
ovr_overlay_wrapper::setOverlayTransformAbsolute(
|
||||||
m_chaperoneFloorOverlayHandle,
|
m_chaperoneFloorOverlayHandle,
|
||||||
m_trackingUniverse,
|
m_trackingUniverse,
|
||||||
&updateTransform,
|
( centerPlaySpaceMatrix ),
|
||||||
"" );
|
"" );
|
||||||
checkOverlayRotation();
|
|
||||||
|
checkCenterMarkerOverlayRotationCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChaperoneTabController::checkOverlayRotation()
|
void ChaperoneTabController::checkCenterMarkerOverlayRotationCount()
|
||||||
{
|
{
|
||||||
// can only turn so quickly soooo roughly .5 secondish update should be fine
|
// can only turn so quickly soooo roughly .5 secondish update should be fine
|
||||||
if ( m_rotationUpdateCounter > 45 )
|
if ( m_rotationUpdateCounter > 45 )
|
||||||
|
|||||||
@@ -376,13 +376,12 @@ private:
|
|||||||
std::vector<ChaperoneProfile> chaperoneProfiles;
|
std::vector<ChaperoneProfile> chaperoneProfiles;
|
||||||
|
|
||||||
std::string m_floorMarkerFN = "/res/img/chaperone/centermark.png";
|
std::string m_floorMarkerFN = "/res/img/chaperone/centermark.png";
|
||||||
void initFloorOverlay();
|
void initCenterMarkerOverlay();
|
||||||
void updateOverlay();
|
void updateCenterMarkerOverlayColor();
|
||||||
void updateOverlayColor();
|
void checkCenterMarkerOverlayRotationCount();
|
||||||
void checkOverlayRotation();
|
|
||||||
int m_rotationUpdateCounter = 0;
|
int m_rotationUpdateCounter = 0;
|
||||||
int m_rotationCurrent = 0;
|
int m_rotationCurrent = 0;
|
||||||
bool m_overlayNeedsUpdate = false;
|
bool m_centerMarkerOverlayIsInit = false;
|
||||||
|
|
||||||
vr::ETrackingUniverseOrigin m_trackingUniverse
|
vr::ETrackingUniverseOrigin m_trackingUniverse
|
||||||
= vr::TrackingUniverseRawAndUncalibrated;
|
= vr::TrackingUniverseRawAndUncalibrated;
|
||||||
@@ -398,6 +397,8 @@ public:
|
|||||||
void dashboardLoopTick();
|
void dashboardLoopTick();
|
||||||
void handleChaperoneWarnings( float distance );
|
void handleChaperoneWarnings( float distance );
|
||||||
|
|
||||||
|
void updateCenterMarkerOverlay( vr::HmdMatrix34_t* centerPlaySpaceMatrix );
|
||||||
|
|
||||||
float boundsVisibility() const;
|
float boundsVisibility() const;
|
||||||
float fadeDistance();
|
float fadeDistance();
|
||||||
float height();
|
float height();
|
||||||
@@ -412,6 +413,7 @@ public:
|
|||||||
int chaperoneColorA() const;
|
int chaperoneColorA() const;
|
||||||
|
|
||||||
bool centerMarkerNew();
|
bool centerMarkerNew();
|
||||||
|
bool m_centerMarkerOverlayNeedsUpdate = false;
|
||||||
|
|
||||||
bool chaperoneFloorToggle();
|
bool chaperoneFloorToggle();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#include "MoveCenterTabController.h"
|
#include "MoveCenterTabController.h"
|
||||||
#include <QQuickWindow>
|
#include <QQuickWindow>
|
||||||
#include "../overlaycontroller.h"
|
#include "../overlaycontroller.h"
|
||||||
#include "../utils/Matrix.h"
|
|
||||||
#include "../quaternion/quaternion.h"
|
#include "../quaternion/quaternion.h"
|
||||||
#include "../settings/settings.h"
|
#include "../settings/settings.h"
|
||||||
|
|
||||||
@@ -1005,6 +1004,14 @@ void MoveCenterTabController::reset()
|
|||||||
m_lastControllerPosition[0] = 0.0f;
|
m_lastControllerPosition[0] = 0.0f;
|
||||||
m_lastControllerPosition[1] = 0.0f;
|
m_lastControllerPosition[1] = 0.0f;
|
||||||
m_lastControllerPosition[2] = 0.0f;
|
m_lastControllerPosition[2] = 0.0f;
|
||||||
|
|
||||||
|
// For Center Marker
|
||||||
|
if ( parent->m_chaperoneTabController.m_centerMarkerOverlayNeedsUpdate )
|
||||||
|
{
|
||||||
|
m_offsetmatrix = utils::k_forwardUpMatrix;
|
||||||
|
parent->m_chaperoneTabController.updateCenterMarkerOverlay(
|
||||||
|
&m_offsetmatrix );
|
||||||
|
}
|
||||||
m_lastMoveHand = vr::TrackedControllerRole_Invalid;
|
m_lastMoveHand = vr::TrackedControllerRole_Invalid;
|
||||||
m_lastRotateHand = vr::TrackedControllerRole_Invalid;
|
m_lastRotateHand = vr::TrackedControllerRole_Invalid;
|
||||||
applyChaperoneResetData();
|
applyChaperoneResetData();
|
||||||
@@ -2567,14 +2574,17 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
|
|||||||
// (we reuse offsetUniverseCenterYaw to rotate the chaperone also)
|
// (we reuse offsetUniverseCenterYaw to rotate the chaperone also)
|
||||||
double offsetUniverseCenterYaw = static_cast<double>( std::atan2(
|
double offsetUniverseCenterYaw = static_cast<double>( std::atan2(
|
||||||
offsetUniverseCenter.m[0][2], offsetUniverseCenter.m[2][2] ) );
|
offsetUniverseCenter.m[0][2], offsetUniverseCenter.m[2][2] ) );
|
||||||
|
|
||||||
double offsetUniverseCenterXyz[3]
|
double offsetUniverseCenterXyz[3]
|
||||||
= { static_cast<double>( offsetUniverseCenter.m[0][3] ),
|
= { static_cast<double>( offsetUniverseCenter.m[0][3] ),
|
||||||
static_cast<double>( offsetUniverseCenter.m[1][3] ),
|
static_cast<double>( offsetUniverseCenter.m[1][3] ),
|
||||||
static_cast<double>( offsetUniverseCenter.m[2][3] ) };
|
static_cast<double>( offsetUniverseCenter.m[2][3] ) };
|
||||||
// unrotate to get raw values of xyz
|
// unrotate to get raw values of xyz
|
||||||
|
|
||||||
rotateCoordinates( offsetUniverseCenterXyz,
|
rotateCoordinates( offsetUniverseCenterXyz,
|
||||||
offsetUniverseCenterYaw
|
offsetUniverseCenterYaw
|
||||||
- ( m_rotation * k_centidegreesToRadians ) );
|
- ( m_rotation * k_centidegreesToRadians ) );
|
||||||
|
|
||||||
if ( abs( offsetUniverseCenterXyz[0] ) > k_maxOpenvrWorkingSetOffest
|
if ( abs( offsetUniverseCenterXyz[0] ) > k_maxOpenvrWorkingSetOffest
|
||||||
|| ( abs( offsetUniverseCenterXyz[0] )
|
|| ( abs( offsetUniverseCenterXyz[0] )
|
||||||
> k_maxOvrasUniverseCenteredTurningOffset
|
> k_maxOvrasUniverseCenteredTurningOffset
|
||||||
@@ -2715,6 +2725,47 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Center Marker for playspace.
|
||||||
|
if ( parent->m_chaperoneTabController.m_centerMarkerOverlayNeedsUpdate )
|
||||||
|
{
|
||||||
|
// Set Unrotated Coordinates
|
||||||
|
float universePlayCenterTempCoords[3] = { 0.0f, 0.0f, 0.0f };
|
||||||
|
universePlayCenterTempCoords[0]
|
||||||
|
-= offsetUniverseCenter.m[0][3]
|
||||||
|
- m_universeCenterForReset.m[0][3];
|
||||||
|
universePlayCenterTempCoords[1]
|
||||||
|
-= offsetUniverseCenter.m[1][3]
|
||||||
|
- m_universeCenterForReset.m[1][3];
|
||||||
|
universePlayCenterTempCoords[2]
|
||||||
|
-= offsetUniverseCenter.m[2][3]
|
||||||
|
- m_universeCenterForReset.m[2][3];
|
||||||
|
// Rotate un-rotated to rotated
|
||||||
|
rotateFloatCoordinates(
|
||||||
|
universePlayCenterTempCoords,
|
||||||
|
static_cast<float>( offsetUniverseCenterYaw ) );
|
||||||
|
// Set Up orientation properly away from raw center
|
||||||
|
utils::matMul33( m_offsetmatrix,
|
||||||
|
offsetUniverseCenter,
|
||||||
|
utils::k_forwardUpMatrix );
|
||||||
|
vr::HmdMatrix34_t rotMatrix;
|
||||||
|
utils::initRotationMatrix(
|
||||||
|
rotMatrix,
|
||||||
|
1,
|
||||||
|
static_cast<float>( -( ( m_rotation * k_centidegreesToRadians )
|
||||||
|
+ offsetUniverseCenterYaw ) ) );
|
||||||
|
|
||||||
|
// Rotates orientation At playspace center
|
||||||
|
vr::HmdMatrix34_t finalmatrix;
|
||||||
|
utils::matMul33( finalmatrix, rotMatrix, m_offsetmatrix );
|
||||||
|
|
||||||
|
finalmatrix.m[0][3] = universePlayCenterTempCoords[0];
|
||||||
|
finalmatrix.m[1][3] = universePlayCenterTempCoords[1];
|
||||||
|
finalmatrix.m[2][3] = universePlayCenterTempCoords[2];
|
||||||
|
|
||||||
|
parent->m_chaperoneTabController.updateCenterMarkerOverlay(
|
||||||
|
&finalmatrix );
|
||||||
|
}
|
||||||
|
|
||||||
// update chaperone working set preview (this does not commit)
|
// update chaperone working set preview (this does not commit)
|
||||||
vr::VRChaperoneSetup()->SetWorkingCollisionBoundsInfo(
|
vr::VRChaperoneSetup()->SetWorkingCollisionBoundsInfo(
|
||||||
updatedBounds, m_collisionBoundsCountForReset );
|
updatedBounds, m_collisionBoundsCountForReset );
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <openvr.h>
|
#include <openvr.h>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
|
#include "../utils/Matrix.h"
|
||||||
#include "../utils/FrameRateUtils.h"
|
#include "../utils/FrameRateUtils.h"
|
||||||
#include "../settings/settings_object.h"
|
#include "../settings/settings_object.h"
|
||||||
|
|
||||||
@@ -205,6 +206,9 @@ private:
|
|||||||
|
|
||||||
unsigned int m_moveCenterSettingsUpdateCounter = 83;
|
unsigned int m_moveCenterSettingsUpdateCounter = 83;
|
||||||
|
|
||||||
|
// Matrix used For Center Marker
|
||||||
|
vr::HmdMatrix34_t m_offsetmatrix = utils::k_forwardUpMatrix;
|
||||||
|
|
||||||
double m_velocity[3] = { 0.0, 0.0, 0.0 };
|
double m_velocity[3] = { 0.0, 0.0, 0.0 };
|
||||||
std::chrono::steady_clock::time_point m_lastGravityUpdateTimePoint;
|
std::chrono::steady_clock::time_point m_lastGravityUpdateTimePoint;
|
||||||
std::chrono::steady_clock::time_point m_lastDragUpdateTimePoint;
|
std::chrono::steady_clock::time_point m_lastDragUpdateTimePoint;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ void SettingsTabController::initStage1()
|
|||||||
void SettingsTabController::initStage2( OverlayController* var_parent )
|
void SettingsTabController::initStage2( OverlayController* var_parent )
|
||||||
{
|
{
|
||||||
this->parent = var_parent;
|
this->parent = var_parent;
|
||||||
|
setNativeChaperoneToggle( nativeChaperoneToggle() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsTabController::dashboardLoopTick()
|
void SettingsTabController::dashboardLoopTick()
|
||||||
@@ -37,6 +38,38 @@ bool SettingsTabController::autoStartEnabled() const
|
|||||||
return m_autoStartEnabled;
|
return m_autoStartEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SettingsTabController::nativeChaperoneToggle()
|
||||||
|
{
|
||||||
|
std::pair<ovr_settings_wrapper::SettingsError, bool> p
|
||||||
|
= ovr_settings_wrapper::getFloat(
|
||||||
|
vr::k_pch_CollisionBounds_Section,
|
||||||
|
vr::k_pch_CollisionBounds_EnableDriverImport,
|
||||||
|
"" );
|
||||||
|
if ( p.first == ovr_settings_wrapper::SettingsError::NoError )
|
||||||
|
{
|
||||||
|
m_nativeChaperoneToggle = !( p.second );
|
||||||
|
}
|
||||||
|
return m_nativeChaperoneToggle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SettingsTabController::setNativeChaperoneToggle( bool value, bool notify )
|
||||||
|
{
|
||||||
|
if ( m_nativeChaperoneToggle != value )
|
||||||
|
{
|
||||||
|
m_nativeChaperoneToggle = !( value );
|
||||||
|
ovr_settings_wrapper::setBool(
|
||||||
|
vr::k_pch_CollisionBounds_Section,
|
||||||
|
vr::k_pch_CollisionBounds_EnableDriverImport,
|
||||||
|
m_nativeChaperoneToggle,
|
||||||
|
"" );
|
||||||
|
// On Error Do Nothing
|
||||||
|
if ( notify )
|
||||||
|
{
|
||||||
|
emit nativeChaperoneToggleChanged( m_nativeChaperoneToggle );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsTabController::setAutoStartEnabled( bool value, bool notify )
|
void SettingsTabController::setAutoStartEnabled( bool value, bool notify )
|
||||||
{
|
{
|
||||||
if ( m_autoStartEnabled != value )
|
if ( m_autoStartEnabled != value )
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "../utils/FrameRateUtils.h"
|
#include "../utils/FrameRateUtils.h"
|
||||||
|
#include "../openvr/ovr_settings_wrapper.h"
|
||||||
|
|
||||||
class QQuickWindow;
|
class QQuickWindow;
|
||||||
// application namespace
|
// application namespace
|
||||||
@@ -16,6 +17,9 @@ class SettingsTabController : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY( bool autoStartEnabled READ autoStartEnabled WRITE
|
Q_PROPERTY( bool autoStartEnabled READ autoStartEnabled WRITE
|
||||||
setAutoStartEnabled NOTIFY autoStartEnabledChanged )
|
setAutoStartEnabled NOTIFY autoStartEnabledChanged )
|
||||||
|
Q_PROPERTY(
|
||||||
|
bool nativeChaperoneToggle READ nativeChaperoneToggle WRITE
|
||||||
|
setNativeChaperoneToggle NOTIFY nativeChaperoneToggleChanged )
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OverlayController* parent;
|
OverlayController* parent;
|
||||||
@@ -23,6 +27,7 @@ private:
|
|||||||
unsigned settingsUpdateCounter = 0;
|
unsigned settingsUpdateCounter = 0;
|
||||||
|
|
||||||
bool m_autoStartEnabled = false;
|
bool m_autoStartEnabled = false;
|
||||||
|
bool m_nativeChaperoneToggle = false;
|
||||||
|
|
||||||
unsigned int m_settingsTabSettingsUpdateCounter = 157;
|
unsigned int m_settingsTabSettingsUpdateCounter = 157;
|
||||||
|
|
||||||
@@ -33,12 +38,15 @@ public:
|
|||||||
void dashboardLoopTick();
|
void dashboardLoopTick();
|
||||||
|
|
||||||
bool autoStartEnabled() const;
|
bool autoStartEnabled() const;
|
||||||
|
bool nativeChaperoneToggle();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setAutoStartEnabled( bool value, bool notify = true );
|
void setAutoStartEnabled( bool value, bool notify = true );
|
||||||
|
void setNativeChaperoneToggle( bool value, bool notify = true );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void autoStartEnabledChanged( bool value );
|
void autoStartEnabledChanged( bool value );
|
||||||
|
void nativeChaperoneToggleChanged( bool value );
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace advsettings
|
} // namespace advsettings
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ struct VideoProfile : settings::ISettingsObject
|
|||||||
|
|
||||||
o.addValue( overlayMethodState );
|
o.addValue( overlayMethodState );
|
||||||
|
|
||||||
|
// TODO add opacity Toggle?
|
||||||
o.addValue( static_cast<double>( opacity ) );
|
o.addValue( static_cast<double>( opacity ) );
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
|
|||||||
@@ -5,6 +5,13 @@
|
|||||||
|
|
||||||
namespace utils
|
namespace utils
|
||||||
{
|
{
|
||||||
|
// TODO possibly expand on this to include other orientations?
|
||||||
|
// This is Forward, and Up orientation matrix
|
||||||
|
constexpr vr::HmdMatrix34_t k_forwardUpMatrix
|
||||||
|
= { { { 1.0f, 0.0f, 0.0f, 0.0f },
|
||||||
|
{ 0.0f, 0.0f, 1.0f, 0.0f },
|
||||||
|
{ 0.0f, -1.0f, 0.0f, 0.0f } } };
|
||||||
|
|
||||||
inline vr::HmdMatrix34_t& initRotationMatrix( vr::HmdMatrix34_t& matrix,
|
inline vr::HmdMatrix34_t& initRotationMatrix( vr::HmdMatrix34_t& matrix,
|
||||||
unsigned axisId,
|
unsigned axisId,
|
||||||
float angle )
|
float angle )
|
||||||
|
|||||||
+11
-5
@@ -67,6 +67,10 @@ CommandLineOptions returnCommandLineParser( const MyQApplication& application )
|
|||||||
k_forceRemoveManifestDescription );
|
k_forceRemoveManifestDescription );
|
||||||
parser.addOption( forceRemoveManifest );
|
parser.addOption( forceRemoveManifest );
|
||||||
|
|
||||||
|
QCommandLineOption resetSettings( k_resetSettings,
|
||||||
|
k_resetSettingsDescription );
|
||||||
|
parser.addOption( resetSettings );
|
||||||
|
|
||||||
parser.process( application );
|
parser.process( application );
|
||||||
|
|
||||||
const bool desktopModeEnabled = parser.isSet( desktopMode );
|
const bool desktopModeEnabled = parser.isSet( desktopMode );
|
||||||
@@ -87,12 +91,14 @@ CommandLineOptions returnCommandLineParser( const MyQApplication& application )
|
|||||||
const bool forceRemoveManifestEnabled = parser.isSet( forceRemoveManifest );
|
const bool forceRemoveManifestEnabled = parser.isSet( forceRemoveManifest );
|
||||||
LOG_IF( forceRemoveManifestEnabled, INFO )
|
LOG_IF( forceRemoveManifestEnabled, INFO )
|
||||||
<< "Forcing removal of applications manifest.";
|
<< "Forcing removal of applications manifest.";
|
||||||
|
const bool resetSettingsEnabled = parser.isSet( resetSettings );
|
||||||
|
LOG_IF( resetSettingsEnabled, INFO ) << "Reset SteamVR Settings.";
|
||||||
|
|
||||||
const CommandLineOptions commandLineArgs{ desktopModeEnabled,
|
const CommandLineOptions commandLineArgs{
|
||||||
forceNoSoundEnabled,
|
desktopModeEnabled, forceNoSoundEnabled,
|
||||||
forceNoManifestEnabled,
|
forceNoManifestEnabled, forceInstallManifestEnabled,
|
||||||
forceInstallManifestEnabled,
|
forceRemoveManifestEnabled, resetSettingsEnabled
|
||||||
forceRemoveManifestEnabled };
|
};
|
||||||
|
|
||||||
LOG( INFO ) << "Command line arguments processed.";
|
LOG( INFO ) << "Command line arguments processed.";
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ struct CommandLineOptions
|
|||||||
const bool forceNoManifest = false;
|
const bool forceNoManifest = false;
|
||||||
const bool forceInstallManifest = false;
|
const bool forceInstallManifest = false;
|
||||||
const bool forceRemoveManifest = false;
|
const bool forceRemoveManifest = false;
|
||||||
|
const bool resetSettings = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Manages the programs control flow and main settings.
|
// Manages the programs control flow and main settings.
|
||||||
@@ -87,6 +88,9 @@ constexpr auto k_forceInstallManifestDescription
|
|||||||
constexpr auto k_forceRemoveManifest = "force-remove-manifest";
|
constexpr auto k_forceRemoveManifest = "force-remove-manifest";
|
||||||
constexpr auto k_forceRemoveManifestDescription
|
constexpr auto k_forceRemoveManifestDescription
|
||||||
= "Forces removing the applications manifest. Application will exit early.";
|
= "Forces removing the applications manifest. Application will exit early.";
|
||||||
|
constexpr auto k_resetSettings = "reset-steamvr-settings";
|
||||||
|
constexpr auto k_resetSettingsDescription
|
||||||
|
= "Resets all SteamVR values that can be modified in OVRAS to defaults.";
|
||||||
|
|
||||||
CommandLineOptions returnCommandLineParser( const MyQApplication& application );
|
CommandLineOptions returnCommandLineParser( const MyQApplication& application );
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{ "major": 5, "minor": 1, "patch": 0, "updateMessage": "", "optionalMessage": "" }
|
{ "major": 5, "minor": 1, "patch": 1, "updateMessage": "", "optionalMessage": "" }
|
||||||
Reference in New Issue
Block a user