diff --git a/docs/development/rayneo-xr.md b/docs/development/rayneo-xr.md index e197b8a8de..0de7f77196 100644 --- a/docs/development/rayneo-xr.md +++ b/docs/development/rayneo-xr.md @@ -149,6 +149,11 @@ DroidDeck SteamVR session. Library launch diagnostics are in logs remain in `vrstartup.log` and Steam's logs directory. It does not intercept arbitrary external `steam://` URLs or change VR game launch arguments. +Only VR-only games (`vr_only`) wait for SteamVR and start it. Games where VR is +optional, such as No Man's Sky, launch normally unless SteamVR is already +running; before this they started (and if needed downloaded) SteamVR on every +Play, so they opened in VR without the user asking for it. + Validation: seven bridge/dispatch tests passed under Node/Python, five Android SteamVR launch tests passed, shell syntax passed and the debug APK built with runtime input verification. The broader Linux compatibility suite cannot run diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat index 04392d0605..c9c8cb1c2a 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-compat @@ -208,7 +208,7 @@ VR_JS = r""" return; } const overview = window.appStore?.GetAppOverviewByGameID?.(gameid); - const vr = overview?.vr_only || overview?.vr_supported || overview?.BSupportsVR?.(); + const vr = overview?.vr_only === true; if (vr && self.subscription && /^[1-9][0-9]{0,19}$/.test(gameid)) { if (self.pending.has(gameid)) return; self.lastError = null; diff --git a/tools/tests/steam_vr_launch_harness.js b/tools/tests/steam_vr_launch_harness.js index ef9c4d5b62..62d0127398 100644 --- a/tools/tests/steam_vr_launch_harness.js +++ b/tools/tests/steam_vr_launch_harness.js @@ -34,24 +34,26 @@ assert.strictEqual(calls[0].receiver, apps); const receiver = {}; apps.RunGame.call(receiver, '611670', 'custom args', 2, 100); apps.RunGame('611670', 'duplicate', -1, 100); -apps.RunGame(620980, '', -1, 100); -assert.deepStrictEqual(requests, ['611670', '620980']); -assert.strictEqual(calls.length, 1); +assert.strictEqual(apps.RunGame(620980, '', -1, 100), 'native'); +assert.deepStrictEqual(requests, ['611670']); +assert.strictEqual(calls.length, 2); +assert.deepStrictEqual(calls[1].args, [620980, '', -1, 100]); changed(false); -assert.strictEqual(calls.length, 1); +assert.strictEqual(calls.length, 2); changed(true); assert.strictEqual(calls.length, 3); -assert.strictEqual(calls[1].receiver, receiver); -assert.deepStrictEqual(calls[1].args, ['611670', 'custom args', 2, 100]); -assert.deepStrictEqual(calls[2].args, [620980, '', -1, 100]); +assert.strictEqual(calls[2].receiver, receiver); +assert.deepStrictEqual(calls[2].args, ['611670', 'custom args', 2, 100]); assert.strictEqual(timers.size, 0); changed(true); assert.strictEqual(calls.length, 3); -apps.RunGame('18446744069414584320', '', -1, 100); +changed(false); +assert.strictEqual(apps.RunGame('18446744069414584320', '', -1, 100), 'native'); assert.deepStrictEqual(calls[3].args, ['18446744069414584320', '', -1, 100]); -assert.strictEqual(requests.at(-1), '18446744069414584320'); +assert.deepStrictEqual(requests, ['611670']); assert.strictEqual(timers.size, 0); +changed(true); apps.RunGame('250820', '', -1, 100); openvr.StartVR(true);