Add ability to change IVRInput bindings, move openvr_init into namespace
openvr_init was not in a namespace. This led to it being globally available. This was not intended. The solution to overlays not showing up in the bindings interface was chosen for ease of implementation and relative ease of end user use. The Kinect2VR project are using a solution where there is a button to shutdown background mode and use scene mode temporarily. This did not work for our project for unknown reasons. The IVRInput system would become non responsive and spam error messages when VR was shut down. Implementation is here: https://github.com/sharkyh20/KinectToVR/blob/12aeb8b33ab20eeb588c72c5d5186dd4d87784d7/SFMLProject/inc/GUIHandler.h#L700 The command line flag will be represented as a .bat file for the end user, like desktop mode and restarting the VR server. When Valve solves the issue of overlays not showing up in the bindings menu, the entire function can essentially be deleted. Official issues here: https://github.com/ValveSoftware/openvr/issues/914 https://github.com/ValveSoftware/openvr/issues/926 https://github.com/ValveSoftware/openvr/issues/879 It is also possible to make the app appear by changing the C:\Program Files (x86)\Steam\config\vrappconfig\*.vrappconfig file for the 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).
This commit is contained in:
@@ -46,6 +46,7 @@ constexpr auto kNoSound = "-nosound";
|
||||
constexpr auto kNoManifest = "-nomanifest";
|
||||
constexpr auto kInstallManifest = "-installmanifest";
|
||||
constexpr auto kRemoveManifest = "-removemanifest";
|
||||
constexpr auto kEnableBindingsInterface = "-bindingsinterface";
|
||||
} // namespace argument
|
||||
|
||||
namespace manifest
|
||||
@@ -357,6 +358,8 @@ 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.";
|
||||
@@ -364,6 +367,15 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user