Manifest for Linux; connect as Background app where Utility is refused
- manifest.vrmanifest: binary_path_linux and binary_path_linux_arm. The Steam Frame's SteamVR reads only binary_path_linux_arm. - handleManifests(): connect as Utility app first (works without a running SteamVR, e.g. from the Windows installer); if SteamVR refuses Utility apps, as on the Steam Frame, connect as Background app. Fail right away on other errors instead of going through initializeOpenVR()'s retry loop. - main(): check --graphics-api before connecting to OpenVR, so a wrong value fails right away. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4826686a4d
commit
b22c35ae29
+20
-2
@@ -262,8 +262,26 @@ void forceRemoveApplicationManifest()
|
||||
[[noreturn]] void handleManifests( const bool installManifest,
|
||||
const bool removeManifest )
|
||||
{
|
||||
openvr_init::initializeOpenVR(
|
||||
openvr_init::OpenVrInitializationType::Utility );
|
||||
// Connect as Utility app first: it works without a running SteamVR (e.g.
|
||||
// from the Windows installer). The Steam Frame's SteamVR refuses Utility
|
||||
// apps (VRInitError_Init_NotAvailableToUtilityApps); there, connect as
|
||||
// Background app, which needs a running SteamVR and never starts it.
|
||||
// VR_Init is called directly: initializeOpenVR() retries every error with
|
||||
// waits, including the one expected here.
|
||||
vr::EVRInitError initError = vr::VRInitError_None;
|
||||
vr::VR_Init( &initError, vr::VRApplication_Utility );
|
||||
if ( initError == vr::VRInitError_Init_NotAvailableToUtilityApps )
|
||||
{
|
||||
qInfo() << "SteamVR refuses Utility apps, connecting as Background "
|
||||
"app.";
|
||||
vr::VR_Init( &initError, vr::VRApplication_Background );
|
||||
}
|
||||
if ( initError != vr::VRInitError_None )
|
||||
{
|
||||
qCritical() << "Failed to connect to SteamVR for manifest handling:"
|
||||
<< vr::VR_GetVRInitErrorAsEnglishDescription( initError );
|
||||
exit( ReturnErrorCode::OPENVR_INIT_ERROR );
|
||||
}
|
||||
|
||||
int exit_code = ReturnErrorCode::SUCCESS;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user