* fix recenter behavior

* temp fix issues

* increment version to dev

* Fix autosave profile initialization, fix openxr movement up/down, allow using space fix in openxr state

* adjusted logging to reduce spam

* removed unused variable

* added delay to openxr space drag to improve performance and stop ovr api calls

* add logging for debugging issues

* improved log verbage

* fix wrong fn call error

* typemismatch error fix

* add default frame bindings

* openXR space drag skip frames increased 3->5, performance still not great

* remove chaperone universe checking completely, we shouldn't need any features

* fix compiler warnings

* update version string to rel

* fix chaperone moving on recenter, fix log spam

* increment version and back to dev

* clarify log

* change to release

* fix openxr space drag issues

* remove commented code around openxr

* increment version

* change how desktop mode displays from URL to steam setting window

* updated openvr to 2.15.6

* increment version

* moved openxr fix to seated mode

* removed calibration state log calls, as without context they aren't particularly useful

* increment version 5.8.16

* remove uncessary logging

* switch keyboard over to instant input instead of buffered

* Fix Edge Cases around keyboard submit, remove permissive compile options

* increment version
This commit is contained in:
ykeara
2026-09-09 11:57:54 -05:00
committed by GitHub
parent 483a010fb8
commit 31df8b476b
25 changed files with 2538 additions and 336 deletions
+35 -4
View File
@@ -1235,17 +1235,39 @@ void OverlayController::mainEventLoop()
LOG( DEBUG ) << "Dashboard deactivated";
m_dashboardVisible = false;
settings::saveChangedSettings();
if(0UL != m_lastTextUID){
submitLastTextField(m_lastTextUID);
m_lastTextUID = 0;
}
}
break;
case vr::VREvent_KeyboardDone:
case vr::VREvent_HideKeyboard:
{
char keyboardBuffer[1024];
vr::VROverlay()->GetKeyboardText( keyboardBuffer, 1024 );
if(0UL != m_lastTextUID){
submitLastTextField(m_lastTextUID);
m_lastTextUID = 0;
}
}
break;
case vr::VREvent_KeyboardCharInput:
{
char keyboardBuffer[64];
vr::VROverlay()->GetKeyboardText( keyboardBuffer, 64 );
emit keyBoardInputSignal( QString( keyboardBuffer ),
static_cast<unsigned long>(
vrEvent.data.keyboard.uUserValue ) );
m_lastTextUID = static_cast<unsigned long>(vrEvent.data.keyboard.uUserValue);
}
// case vr::VREvent_KeyboardDone:
// {
// char keyboardBuffer[1024];
// vr::VROverlay()->GetKeyboardText( keyboardBuffer, 1024 );
// emit keyBoardInputSignal( QString( keyboardBuffer ),
// static_cast<unsigned long>(
// vrEvent.data.keyboard.uUserValue ) );
// }
break;
case vr::VREvent_SeatedZeroPoseReset:
@@ -1572,11 +1594,20 @@ const vr::VROverlayHandle_t& OverlayController::overlayThumbnailHandle()
void OverlayController::showKeyboard( QString existingText,
unsigned long userValue )
{
// vr::VROverlay()->ShowKeyboardForOverlay(
// m_ulOverlayHandle,
// vr::k_EGamepadTextInputModeNormal,
// vr::k_EGamepadTextInputLineModeSingleLine,
// 0,
// "Advanced Settings Overlay",
// 1024,
// existingText.toStdString().c_str(),
// userValue );
vr::VROverlay()->ShowKeyboardForOverlay(
m_ulOverlayHandle,
vr::k_EGamepadTextInputModeNormal,
vr::k_EGamepadTextInputLineModeSingleLine,
0,
vr::KeyboardFlag_Modal+vr::KeyboardFlag_Minimal+vr::KeyboardFlag_HideDoneKey,
"Advanced Settings Overlay",
1024,
existingText.toStdString().c_str(),
+2 -1
View File
@@ -1,5 +1,4 @@
#pragma once
#include <openvr.h>
#include <QtCore/QtCore>
// because of incompatibilities with QtOpenGL and GLEW we need to cherry pick
@@ -131,6 +130,7 @@ private:
QString m_updateMessage = "";
QString m_optionalMessage = "";
QString m_versionCheckText = "";
unsigned long m_lastTextUID = 0;
QUrl m_runtimePathUrl;
@@ -293,6 +293,7 @@ signals:
void autoApplyChaperoneEnabledChanged( bool value );
void soundVolumeChanged( double value );
void desktopModeToggleChanged( bool value );
void submitLastTextField(unsigned long value = 0);
};
} // namespace advsettings
+48 -5
View File
@@ -5,6 +5,7 @@ import ovras.advsettings 1.0
TextField {
property int keyBoardUID: 0
property string savedText: ""
property bool active: false
id: myTextField
color: "#d9dbe0"
text: ""
@@ -18,19 +19,25 @@ TextField {
}
onClicked: {
myTextField.forceActiveFocus()
active = true;
}
}
onActiveFocusChanged: {
if (activeFocus) {
active = true;
if (!OverlayController.desktopMode) {
OverlayController.showKeyboard(text, keyBoardUID)
} else {
savedText = text
}
//savedText = text
}
//When box loses focus apply changes
else{
myTextField.onInputEvent(text)
active = false;
}
}
onEditingFinished: {
if (OverlayController.desktopMode && savedText !== text) {
if(OverlayController.desktopMode){
myTextField.onInputEvent(text)
}
}
@@ -39,11 +46,47 @@ TextField {
}
Connections {
target: OverlayController
onSubmitLastTextField:{
//value here is UID
if(value == 0){
active = false;
return;
}
if(value == keyBoardUID && active == true){
myTextField.onInputEvent(text)
active = false;
}
}
onKeyBoardInputSignal: {
if (userValue == keyBoardUID) {
if (myTextField.text !== input) {
myTextField.onInputEvent(input)
if(input == '\b'){
myTextField.text = text.slice(0,-1)
return
}
else if(input == '\e'){
myTextField.text = text.slice(0,cursorPosition)+text.slice(cursorposition+1)
return;
}
//Execute input
else if(input == '\n'){
if(!OverlayController.desktopMode){
//myTextField.onInputEvent(input)
myTextField.focus = false;
}
return;
}
else if(input=='\r'){
return;
}
else{
myTextField.text = text + input;
}
//if (myTextField.text !== input) {
// myTextField.onInputEvent(input)
//}
}
}
}
+17 -31
View File
@@ -274,10 +274,11 @@ void MoveCenterTabController::setTrackingUniverse( int value, bool notify )
if ( m_trackingUniverse != value )
{
vr::VRChaperoneSetup()->HideWorkingSetPreview();
if ( !m_roomSetupModeDetected && value == vr::TrackingUniverseStanding )
{
reset();
}
//TODO verify
// if ( !m_roomSetupModeDetected && value == vr::TrackingUniverseStanding )
// {
// reset();
// }
m_trackingUniverse = value;
if ( notify )
@@ -914,20 +915,15 @@ void MoveCenterTabController::incomingZeroReset()
// aspects) IN mixed tracking environments I get this issue, the check if
// there is an error and apply autosaved profile is hopefully a workaround
//This should catch OpenXR games, and helps prevent a loop on zero resets.
if(m_trackingUniverse==vr::TrackingUniverseRawAndUncalibrated){
return;
}
auto calState = vr::VRChaperone()->GetCalibrationState();
LOG( INFO ) << "Calibration State on Recenter is: " << calState;
//Any Logging should be handled after openXR check to avoid spam;
//auto calState = vr::VRChaperone()->GetCalibrationState();
//LOG( INFO ) << "Calibration State on Recenter is: " << calState;
//TODO 8/3/2026 SteamFrame May Need special handling, will discuss With Valve currently
//reset zero pose seems to move floor level as well as our changes, requiring 2 resets to set at correct level
//or we could potentially not apply our offset during this process
float offset[3] = { 0, 0, 0 };
offset[1] = -m_offsetY;
//TODO set universe center and seated recenter as 0 for this part
vr::VRChaperoneSetup()->RevertWorkingCopy();
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(
&m_universeCenterForReset );
@@ -939,12 +935,14 @@ void MoveCenterTabController::incomingZeroReset()
return;
}
//TODO 9/4/26 This needs to be looked at This moves the chaperone, and seems to do same thing as
//zerooffsets....
void MoveCenterTabController::reset()
{
// DO NOT attempt to apply autosaved profile on reset, as it is triggered by
// the apply chaperone profile Side effects are bad!
auto calState = vr::VRChaperone()->GetCalibrationState();
LOG( INFO ) << "Calibration State on Reset is: " << calState;
//auto calState = vr::VRChaperone()->GetCalibrationState();
//LOG( INFO ) << "Calibration State on Reset is: " << calState;
if ( !m_chaperoneBasisAcquired )
{
@@ -1146,7 +1144,7 @@ void MoveCenterTabController::zeroOffsets()
m_roomSetupModeDetected = false;
}
LOG( INFO ) << "SUCCESS: Chaperone Data Updated and Offsets zeroed out";
//LOG( INFO ) << "SUCCESS: Chaperone Data Updated and Offsets zeroed out";
}
void MoveCenterTabController::sendSeatedRecenter()
@@ -1893,8 +1891,9 @@ void MoveCenterTabController::resetOffsets( bool resetOffsetsJustPressed )
emit offsetZChanged( m_offsetZ );
emit rotationChanged( m_rotation );
updateSpace( true );
auto calState = vr::VRChaperone()->GetCalibrationState();
LOG( INFO ) << "Calibration State on Reset Offsets is: " << calState;
//auto calState = vr::VRChaperone()->GetCalibrationState();
//LOG( INFO ) << "Calibration State on Reset Offsets is: " << calState;
// if ( calState > 199 && m_initComplete )
// {
@@ -2623,7 +2622,7 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
}
// keep the seated origin synced with offsets if in seated mode
if ( m_trackingUniverse == vr::TrackingUniverseSeated )
if ( m_trackingUniverse == vr::TrackingUniverseSeated || m_trackingUniverse == vr::TrackingUniverseRawAndUncalibrated )
{
vr::HmdMatrix34_t offsetSeatedCenter;
@@ -2708,19 +2707,6 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
vr::VRChaperoneSetup()->SetWorkingStandingZeroPoseToRawTrackingPose(
&offsetUniverseCenter );
//openxr
//In OpenXR titles commitworkingcopy essentially causes zero resets, this is too much work, and causes lag
//As such we will update every third frame for OpenXR titles, this should be reasonably responsive.
//We may have to re-visit or make user adjustable
if(m_trackingUniverse==vr::TrackingUniverseRawAndUncalibrated){
m_openXRSkip++;
if(m_openXRSkip % 5==0){
vr::VRChaperoneSetup()->CommitWorkingCopy(
vr::EChaperoneConfigFile_Live );
m_openXRSkip = 0;
}
}
//This is what actually throws you into the "working set" instead of live.
vr::VRChaperoneSetup()->ShowWorkingSetPreview();
if ( m_collisionBoundsCountForReset > 0 )
+3 -4
View File
@@ -507,14 +507,13 @@ void SteamVRTabController::launchBindingUI()
LOG( ERROR )
<< "failed to get input handle? is your right controller on?";
}
bool desktopShow = false;
if ( parent->isDesktopMode() )
{
QDesktopServices::openUrl(
QUrl( "http://127.0.0.1:27062/dashboard/controllerbinding.html" ) );
return;
desktopShow = true;
}
auto error = vr::VRInput()->OpenBindingUI(
application_strings::applicationKey, actionHandle, inputHandle, false );
application_strings::applicationKey, actionHandle, inputHandle, desktopShow );
if ( error != vr::VRInputError_None )
{
LOG( ERROR ) << "Input Error: " << error;