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
+31
View File
@@ -26,3 +26,34 @@
- `libopenvr_api.so` is resolved from the binary's directory (`ldd`).
- Not started: without a running SteamVR the start hangs in OpenVR init (expected; tested
on the Frame in step 5).
### Step 2: platform option, R7, tick (2026-10-07)
**Changes:**
- **Platform option:**
- CMake option `OVRAS_STEAM_FRAME` (default OFF) sets the compile definition
`OVRAS_STEAM_FRAME=1`.
- New `src/utils/platform_capabilities.h` evaluates it as the only place. It holds
`k_chaperoneCommitSupported`, `k_defaultVsyncDisabled` and `k_defaultCustomTickRateMs`.
- **Tick (R6):**
- In "vsync disabled" mode, `m_pumpEventsTimer` runs directly at `customTickRateMs`
(`applyTickInterval()`, `Qt::PreciseTimer`); the 1 ms counting is gone.
- Changing the setting restarts the timer.
- Setting defaults in `settings_controller.h` come from the constants: Frame `true`/11 ms,
otherwise unchanged `false`/20 ms.
- **R7:** with `!k_chaperoneCommitSupported`:
- `updateChaperoneResetData()` and `applyChaperoneResetData()` skip
`CommitWorkingCopy`/`RevertWorkingCopy`. Each logs once per function.
- The init autosave profile is skipped.
**Results:**
- Both variants (default and `-DOVRAS_STEAM_FRAME=ON`) build on x86_64. The definition is
only set in the Frame variant (`compile_commands.json`).
- Not tested at runtime yet (Frame, step 5).
**Notes:**
- Another commit at start-up remains, but only on opt-in. `SetWidget()` applies a chaperone
profile and commits when "auto-apply chaperone" (`autoApplyChaperoneToggle`, default
`false`) is on. That's a chaperone-profile feature, so it belongs to R5 (iteration 2).
- clang-format reflows comment blocks next to new comments. Separate new comments from
existing commented-out code with a blank line, otherwise the diff grows.