Add a Steam Frame flavour of the Android app with Frame controller bindings

The Steam Frame runs Android apps through Lepton with SteamVR's OpenXR
runtime. A third headset flavour, steamFrame, targets it:

- -mcpu=cortex-x4+nosve for the Snapdragon 8 Gen 3 (its firmware does
  not expose SVE, which clang otherwise auto-vectorises with), from one
  flavour-to-CPU map that the kit export now reads instead of guessing
  from the variant name.
- MKW_ANDROID_HEADSET=steam_frame defines MKW_HEADSET_STEAM_FRAME for
  the runtime's own targets, for Frame-specific defaults.
- A manifest without the Horizon OS entries, and FrameEntryActivity as
  the single real MAIN/LAUNCHER activity with the Khronos and Oculus VR
  categories, which Lepton needs to start an app in VR. It opens the
  setup panel and, when the selected game can start, the game on top.
- XR_VALVE_frame_controller_interaction: the Frame controller profile
  with its left D-pad (new dpad_* actions, the Wii Remote's D-pad or the
  gamepad's), View as menu and the left shoulder as the panel button.
  Also requested on Windows for SteamVR streaming to a Frame.
- Build-Quest.ps1, Build-QuestGame.ps1 and Run-Quest.ps1 take
  -Headset frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019HBRGKTE1GnN2ah8gcZKr3
This commit is contained in:
Claude committed 2026-10-04 08:27:12 +00:00
1 parent 4dc213cc7e
commit 150062280d
13 files changed
+257 -22

No files matched your search

+5
View File
@@ -193,6 +193,11 @@ private:
XrAction m_button_primary = XR_NULL_HANDLE; // A / X
XrAction m_button_secondary = XR_NULL_HANDLE; // B / Y
XrAction m_menu = XR_NULL_HANDLE;
// The Steam Frame's left D-pad (valve/frame_controller_valve); Touch has none.
XrAction m_dpad_up = XR_NULL_HANDLE;
XrAction m_dpad_down = XR_NULL_HANDLE;
XrAction m_dpad_left = XR_NULL_HANDLE;
XrAction m_dpad_right = XR_NULL_HANDLE;
XrAction m_aim_pose = XR_NULL_HANDLE;
XrAction m_grip_pose = XR_NULL_HANDLE;
XrAction m_haptic = XR_NULL_HANDLE;
+12
View File
@@ -341,6 +341,12 @@ struct HandInputs {
float squeeze = 0.0f;
float stick_x = 0.0f;
float stick_y = 0.0f; // +up
// A D-pad, which only the Steam Frame's left controller has
// (valve/frame_controller_valve).
bool dpad_up = false;
bool dpad_down = false;
bool dpad_left = false;
bool dpad_right = false;
};
// Adapted from DolphinXR's default "OpenXR Wii Remote" profile
@@ -353,6 +359,8 @@ struct HandInputs {
// HOME has no button; left Y opens the settings panel (openxr_settings_panel.h).
// The grips press nothing: they take hold of the wheel (openxr_driving.h), and C
// is the game's look-behind, which a hand on the wheel would otherwise hold down.
// A controller D-pad (the Steam Frame's left one) is the remote's D-pad; the
// Frame's left View button is the left menu and its left shoulder the left Y.
inline uint32_t RemoteButtons(const HandInputs& left, const HandInputs& right) noexcept {
uint32_t hold = 0;
const auto press = [&hold](bool held, uint32_t bit) {
@@ -367,6 +375,10 @@ inline uint32_t RemoteButtons(const HandInputs& left, const HandInputs& right) n
press(right.stick_y < -kPressThreshold, kButtonTwo);
press(left.primary || left.menu, kButtonPlus);
press(left.trigger > kPressThreshold, kButtonZ);
press(left.dpad_up || right.dpad_up, kButtonUp);
press(left.dpad_down || right.dpad_down, kButtonDown);
press(left.dpad_left || right.dpad_left, kButtonLeft);
press(left.dpad_right || right.dpad_right, kButtonRight);
return hold;
}