mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 06:00:25 +02:00
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:
13 files changed
+257
-22
No files matched your search
@@ -53,6 +53,19 @@ val hasRetroRewindShards: Boolean = run {
|
||||
shards.isFile && shards.readText().contains("set(MKW_HAVE_RETRO_REWIND_SHARDS ON)")
|
||||
}
|
||||
|
||||
// Each headset flavour's AArch64 -mcpu target. The game kit records it, and the kit export, the APK
|
||||
// audit (Build-Quest.ps1), the PC build (QuestGameKit.psm1), the on-headset build and the package
|
||||
// import all refuse a game built for another one.
|
||||
val headsetCpus = mapOf(
|
||||
// Snapdragon XR2 and newer. Keep this as the default build target.
|
||||
"modernQuest" to "cortex-a77",
|
||||
// Snapdragon 835. cortex-a77 binaries terminate with SIGILL on Quest 1.
|
||||
"quest1" to "kryo",
|
||||
// Snapdragon 8 Gen 3 (Cortex-X4, A720 and A520, all ARMv9.2). Its firmware does not expose SVE,
|
||||
// which clang would otherwise auto-vectorise with for a cortex-x4.
|
||||
"steamFrame" to "cortex-x4+nosve",
|
||||
)
|
||||
|
||||
// android/nod-jni: nod, the disc image library the PC installer runs as nodtool,
|
||||
// cross-compiled with cargo for the launcher's "Select disc image". Needs a Rust
|
||||
// toolchain with the aarch64-linux-android target (see docs/quest-port.md).
|
||||
@@ -152,11 +165,11 @@ android {
|
||||
dimension = "headset"
|
||||
manifestPlaceholders["mkwQuestSupportedDevices"] = "quest2|quest3|quest3s|questpro"
|
||||
buildConfigField("boolean", "QUEST1_DIRECT_LAUNCH", "false")
|
||||
buildConfigField("String", "ANDROID_CPU", "\"cortex-a77\"")
|
||||
buildConfigField("boolean", "STEAM_FRAME", "false")
|
||||
buildConfigField("String", "ANDROID_CPU", "\"${headsetCpus.getValue("modernQuest")}\"")
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
// Snapdragon XR2 and newer. Keep this as the default build target.
|
||||
arguments += "-DMKW_ANDROID_CPU=cortex-a77"
|
||||
arguments += "-DMKW_ANDROID_CPU=${headsetCpus.getValue("modernQuest")}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,11 +177,30 @@ android {
|
||||
dimension = "headset"
|
||||
manifestPlaceholders["mkwQuestSupportedDevices"] = "quest|quest2"
|
||||
buildConfigField("boolean", "QUEST1_DIRECT_LAUNCH", "true")
|
||||
buildConfigField("String", "ANDROID_CPU", "\"kryo\"")
|
||||
buildConfigField("boolean", "STEAM_FRAME", "false")
|
||||
buildConfigField("String", "ANDROID_CPU", "\"${headsetCpus.getValue("quest1")}\"")
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
// Snapdragon 835. cortex-a77 binaries terminate with SIGILL on Quest 1.
|
||||
arguments += "-DMKW_ANDROID_CPU=kryo"
|
||||
arguments += "-DMKW_ANDROID_CPU=${headsetCpus.getValue("quest1")}"
|
||||
}
|
||||
}
|
||||
}
|
||||
// Valve's Steam Frame, through Lepton (SteamOS's Android layer) and SteamVR's Android
|
||||
// OpenXR runtime. Its manifest (src/steamFrame) drops the Horizon OS entries, and
|
||||
// MKW_ANDROID_HEADSET gives the runtime the Frame's defaults (runtime_config.h).
|
||||
create("steamFrame") {
|
||||
dimension = "headset"
|
||||
// Horizon OS only; src/steamFrame/AndroidManifest.xml removes the entry.
|
||||
manifestPlaceholders["mkwQuestSupportedDevices"] = ""
|
||||
buildConfigField("boolean", "QUEST1_DIRECT_LAUNCH", "false")
|
||||
buildConfigField("boolean", "STEAM_FRAME", "true")
|
||||
buildConfigField("String", "ANDROID_CPU", "\"${headsetCpus.getValue("steamFrame")}\"")
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments += listOf(
|
||||
"-DMKW_ANDROID_CPU=${headsetCpus.getValue("steamFrame")}",
|
||||
"-DMKW_ANDROID_HEADSET=steam_frame",
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -324,7 +356,7 @@ androidComponents {
|
||||
dependsOn("merge${capitalized}NativeLibs")
|
||||
appDir.set(layout.projectDirectory)
|
||||
script.set(rootProject.layout.projectDirectory.file("Export-QuestGameKit.ps1"))
|
||||
androidCpu.set(if (variant.name.startsWith("quest1", ignoreCase = true)) "kryo" else "cortex-a77")
|
||||
androidCpu.set(headsetCpus.getValue(checkNotNull(variant.flavorName) { "${variant.name} has no headset flavour" }))
|
||||
outputDir.set(layout.buildDirectory.dir("generated/assets/questGameKit/${variant.name}"))
|
||||
llvmStrip.set(sdkComponents.ndkDirectory.map {
|
||||
it.file("toolchains/llvm/prebuilt/$host/bin/llvm-strip" + if (host.startsWith("windows")) ".exe" else "")
|
||||
|
||||
Reference in new issue
Block a user