Remove option forcing bindings to show up in SteamVR

Overlay applications show up in the bindings menu after SteamVR beta
1.3.1, making these features unnecessary.
This commit is contained in:
Vasily
2019-03-10 23:12:26 +01:00
committed by username223
parent 84be2090c8
commit 5d2901be33
6 changed files with 1 additions and 77 deletions
-11
View File
@@ -16,8 +16,6 @@ int main( int argc, char* argv[] )
argc, argv, argument::kInstallManifest );
const bool removeManifest = argument::CheckCommandLineArgument(
argc, argv, argument::kRemoveManifest );
const bool bindingsInterface = argument::CheckCommandLineArgument(
argc, argv, argument::kEnableBindingsInterface );
// If a command line arg is set, make sure the logs reflect that.
LOG_IF( desktopMode, INFO ) << "Desktop mode enabled.";
@@ -25,15 +23,6 @@ int main( int argc, char* argv[] )
LOG_IF( noManifest, INFO ) << "vrmanifest disabled.";
LOG_IF( installManifest, INFO ) << "Install manifest enabled.";
LOG_IF( removeManifest, INFO ) << "Remove manifest enabled.";
LOG_IF( bindingsInterface, INFO ) << "Bindings interface enabled.";
if ( bindingsInterface )
{
// This is a temporary solution until Valve fixes overlays not
// showing up in the bindings interface. See function description for
// more info.
openvr_init::openBindingsMenu();
}
// It is important that either install_manifest or remove_manifest are true,
// otherwise the handleManifests function will not behave properly.
-53
View File
@@ -31,59 +31,6 @@ void initializeProperly()
}
}
/*!
Initializes OpenVR to be in the bindings menu and then exits.
This is needed because all applications initialized with OpenVR that aren't of
type vr::VRApplication_Scene do not show up the in bindings menu.
This is obviously an ugly hack and should be done away with as soon as Valve
fixes this issue.
Official Issues for this:
https://github.com/ValveSoftware/openvr/issues/914
https://github.com/ValveSoftware/openvr/issues/926
https://github.com/ValveSoftware/openvr/issues/879
You can also make it appear by changing the
C:\Program Files (x86)\Steam\config\vrappconfig\*.vrappconfig file for your
project to have a "last_launch_time" of something greater than zero.
From experimentation it seems that there's a cutoff time around 2 weeks before
the current time. Setting it to the day before seems to be a good bet. (In unix
time).
*/
[[noreturn]] void openBindingsMenu()
{
// Prefix the logs with this to visibly document that this isn't how things
// are supposed to be. Hopefully someone reads the logs and comes here after
// Valve has fixed it.
constexpr auto logPrefix = "[HACK]::openBindingsMenu ";
auto initError = vr::VRInitError_None;
LOG( INFO ) << logPrefix << "Initializing application as scene.";
vr::VR_Init( &initError, vr::VRApplication_Scene );
if ( initError != vr::VRInitError_None )
{
LOG( ERROR ) << logPrefix << "Error initializing application as scene.";
exit( 2 );
}
else
{
LOG( INFO ) << logPrefix << "Application initialized as scene.";
}
// This needs to be initialized, otherwise the bindings won't show up in the
// menu.
input::Manifest manifest;
// SteamVR just needs a good enough time to start up comfortably and for the
// user to get into the bindings menu.
while ( true )
{
}
}
OpenVR_Init::OpenVR_Init()
{
initializeProperly();
-2
View File
@@ -2,8 +2,6 @@
namespace openvr_init
{
[[noreturn]] void openBindingsMenu();
/*!
Initializes OpenVR and checks validity of interface versions. Shuts down OpenVR
when destroyed.
-1
View File
@@ -1 +0,0 @@
start AdvancedSettings.exe -bindingsinterface
-1
View File
@@ -45,7 +45,6 @@ constexpr auto kNoSound = "-nosound";
constexpr auto kNoManifest = "-nomanifest";
constexpr auto kInstallManifest = "-installmanifest";
constexpr auto kRemoveManifest = "-removemanifest";
constexpr auto kEnableBindingsInterface = "-bindingsinterface";
} // namespace argument
namespace manifest