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:
ykeara
2020-06-02 12:10:21 -05:00
committed by GitHub
parent 4b94a4bd27
commit dca1e18e0e
24 changed files with 446 additions and 316 deletions
+222 -206
View File
@@ -1,5 +1,6 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
import "common"
@@ -7,233 +8,248 @@ import "common"
MyStackViewPage {
headerText: "Application Settings"
content: ColumnLayout {
spacing: 18
content: ScrollView{
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
MyToggleButton {
id: settingsAutoStartToggle
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
ColumnLayout {
spacing: 18
MyToggleButton {
id: vsyncDisabledToggle
text: "Disable App Vsync"
id: settingsAutoStartToggle
text: "Autostart"
onCheckedChanged: {
OverlayController.setVsyncDisabled(checked, true)
customTickRateText.visible = checked
customTickRateLabel.visible = checked
customTickRateMsLabel.visible = checked
SettingsTabController.setAutoStartEnabled(checked, false)
}
}
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"
id: allowExternalEditsToggle
text: "Allow External App Chaperone Edits (Danger)"
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: {
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
MyToggleButton {
id: universeCenteredRotationToggle
text: "Universe-Centered Rotation (Disables HMD Centering)"
onCheckedChanged: {
MoveCenterTabController.setUniverseCenteredRotation(checked, true)
}
}
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
enableSeatedMotionToggle.checked = MoveCenterTabController.enableSeatedMotion
MyToggleButton {
id: enableSeatedMotionToggle
text: "Enable Motion Features When in Seated Mode (Experimental)"
onCheckedChanged: {
MoveCenterTabController.setEnableSeatedMotion(checked, true)
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && checked
}
}
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
MyToggleButton {
id: disableCrashRecoveryToggle
text: "Disable Automatic Crash Recovery of Chaperone Config"
onCheckedChanged: {
OverlayController.setCrashRecoveryDisabled(checked, true)
}
}
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 {
target: SettingsTabController
onAutoStartEnabledChanged: {
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
}
onNativeChaperoneToggleChanged:{
nativeChaperoneToggleButton.checked = SettingsTabController.nativeChaperoneToggle
}
}
Connections {
@@ -282,5 +298,5 @@ MyStackViewPage {
disableVersionCheckToggle.checked = OverlayController.disableVersionCheck
}
}
}
} // end scroll
}
@@ -556,6 +556,8 @@ MyStackViewPage {
}
chaperoneHeightText.text = h
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
chaperoneForceBoundsToggle.checked = ChaperoneTabController.forceBounds
chaperoneDisableChaperone.checked = ChaperoneTabController.disableChaperone
@@ -74,7 +74,7 @@ GroupBox {
chaperoneFloorToggleBtn.checked = ChaperoneTabController.chaperoneFloorToggle
}
onCenterMarkerChanged:{
legacyCenterMarkerbtn.checked = ChaperoneTabController.centermarker
legacyCenterMarkerbtn.checked = ChaperoneTabController.centerMarker
}
}
}
@@ -10,7 +10,7 @@ GroupBox {
label: MyText {
leftPadding: 10
text: "Auto-turn (aka infinite walk)"
text: "Auto-Turn (for discrete redirected walking)"
bottomPadding: -10
}
background: Rectangle {
@@ -10,7 +10,7 @@ GroupBox {
label: MyText {
leftPadding: 10
text: "Redirected Walking"
text: "Vestibular Motion (for continuous redirected walking)"
bottomPadding: -10
}
background: Rectangle {
@@ -10,7 +10,7 @@ GroupBox {
label: MyText {
leftPadding: 10
text: "Space Turn"
text: "Space Turn (for manual redirected walking)"
bottomPadding: -10
}
background: Rectangle {