Add a Steam Frame build option; no chaperone commit at start; timer-based tick

- CMake option OVRAS_STEAM_FRAME. It is evaluated only in
  src/utils/platform_capabilities.h, which turns it into named capability
  constants and platform defaults.
- Where the chaperone can't be committed (Steam Frame: it shifts the play
  area), MoveCenterTabController no longer commits the working copy at start-up
  or when applying reset data, and doesn't create the init autosave profile.
  Skips are logged once.
- In "vsync disabled" mode the pump timer now runs directly at the custom tick
  rate instead of firing every 1 ms and counting. The Frame defaults to this
  mode at 11 ms (~90 Hz).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Matthias Janetschek
2026-10-07 13:35:46 +02:00
co-authored by Claude Opus 5.5
parent 266a2f9ce9
commit 423ea57db7
7 changed files with 141 additions and 19 deletions
+44 -2
View File
@@ -1,10 +1,13 @@
#include "MoveCenterTabController.h"
#include <QQuickWindow>
#include <set>
#include <string>
#include <QtLogging>
#include <QtDebug>
#include "../overlaycontroller.h"
#include "../quaternion/quaternion.h"
#include "../settings/settings.h"
#include "../utils/platform_capabilities.h"
void rotateCoordinates( double coordinates[3], double angle )
{
@@ -1106,7 +1109,13 @@ void MoveCenterTabController::zeroOffsets()
if ( calState != 200 )
{
// all init complete, safe to autosave chaperone profile
parent->m_chaperoneTabController.createNewAutosaveProfile();
// Not where the chaperone can't be committed: the autosave
// exists to restore a committed play area later.
if ( platform::k_chaperoneCommitSupported )
{
parent->m_chaperoneTabController
.createNewAutosaveProfile();
}
m_initComplete = true;
m_chaperoneBasisAcquired = true;
qInfo() << "Chaperone Initilization Complete, Space Drag "
@@ -1172,6 +1181,19 @@ void MoveCenterTabController::clampVelocity( double* velocity )
}
}
// Logs once per caller that a chaperone commit was skipped, so the log shows
// it without repeating it every tick.
static void logSkippedChaperoneCommit( const char* caller )
{
static std::set<std::string> logged;
if ( logged.insert( caller ).second )
{
qInfo() << caller
<< ": CommitWorkingCopy skipped, not supported on this "
"platform (logged once)";
}
}
void MoveCenterTabController::updateChaperoneResetData()
{
//auto cstate = vr::VRChaperone()->GetCalibrationState();
@@ -1183,9 +1205,20 @@ void MoveCenterTabController::updateChaperoneResetData()
// }
// else
//{
// Committing writes the working copy as the live play area. Where that
// isn't supported (it shifts the play area on the Steam Frame), only the
// working copy is read below.
if ( platform::k_chaperoneCommitSupported )
{
vr::VRChaperoneSetup()->CommitWorkingCopy(
vr::EChaperoneConfigFile_Live );
vr::VRChaperoneSetup()->RevertWorkingCopy();
}
else
{
logSkippedChaperoneCommit( "updateChaperoneResetData" );
}
//}
unsigned currentQuadCount = 0;
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr,
@@ -1228,7 +1261,16 @@ void MoveCenterTabController::applyChaperoneResetData()
// vr::VRChaperoneSetup()->SetWorkingSeatedZeroPoseToRawTrackingPose(
// &m_seatedCenterForReset );
vr::VRChaperoneSetup()->CommitWorkingCopy( vr::EChaperoneConfigFile_Live );
// See updateChaperoneResetData(): no commit where it isn't supported.
if ( platform::k_chaperoneCommitSupported )
{
vr::VRChaperoneSetup()->CommitWorkingCopy(
vr::EChaperoneConfigFile_Live );
}
else
{
logSkippedChaperoneCommit( "applyChaperoneResetData" );
}
unsigned checkQuadCount = 0;
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr,