When the vive pro wireless adapter loses connection, its audio devices are
removed, causing an OnDefaultDeviceChanged event to be issued for each
such device that was previously set as the default. However, if no other
device is available for the role that was disconnected (e.g. if the Vive
Pro was providing the only system microphone), then pwstrDefaultDeviceId
is NULL.
In this case, we would invoke getDevice on the NULL device ID, then
attempt to print the default device name in the debug logging path; this
NULL dereference would cause AdvancedSettings to crash.
This change simply fixes the logging code to not attempt to print the
new default device name when it is NULL.
This removes the massively indented logic in the previous version.
Notice that individual components will still be imported with an
import "utilities_page". Therefore anything except UtilitiesPage.qml
should be in a separate folder.
The QML at the moment is a giant mess. Moving pages into individual
folders and properly abstracting the sub components of the pages will
allow for much easier development and better error messages.
Additionally it will prevent polluting the global namespace. Really, all
the reasons for avoiding globally available values and using
abstractions in regular programming also come into play here.
All bindings are disabled by default. This is to prevent confusing
behaviour from users who do not know about the new bindings. Forcing
users to manually set up their bindings will also enable them to play
around with the SteamVR bindings interface, which allows for much more
versatile binding options that our current offerings.
All actions are curently in main action set. If the selection of
bindings was greatly expanded it could be beneficial to encapsulate the
options more. The current code is more intended as a proof of concept
until our full binding needs have been uncovered.
The processInputBindings function should probably also be split into
several functions of related bindings, as the amount of bindings grows.
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/914https://github.com/ValveSoftware/openvr/issues/926https://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).
Keeping the action name, handle and type together allows for better
error messages and limited run time type checking, to ensure that the
wrong function isn't called.
It is necessary to initialize the manifest in a class, since the Actions
depend on this being set.
Several files have been moved around to be more consistent.
Putting them in the new directory makes the automatically get included
for deployment.
legacy_actions.json was not a good name for the file, since it actually
contained default bindings for Vive controllers. vive_defaults.json
better explains what it is.
In order to test new system:
Build and deploy application.
Copy both files from IVRInput/ dir into the bin/win64 folder.
Change const std::string m_actionManifestPath in steamivrinput.h to be
directly to your action_manifest.json file.
Run and turn on a Vive controller. Press the menu button. If logs say
"NEXT SONG SET!" it works.
The OpenVR init code is currently being run in the OverlayController
constructor. Member objects that are initialized before the
OverlayController (ideally all of them) can't use OpenVR APIs before the
first line of the OverlayController constructor. Implementing the OpenVR
Init code as a class means that it is able to initialize before all the
other objects and allow them to use OpenVR APIs in their constructors.
The class has been placed in a folder called "overlaycontroller" to
signify that it should only be used by the OverlayController.
openvr_init.h uses #pragma once despite it being unofficial since it is
supported on all modern compilers.
The copy constructor, copy assignment operator, move constructor and
move assignment operator have been explicitly deleted in order to make
sure nobody tries to use the object in an unintended way, and to
document that these functions should not be automatically created.
The version error messages have been replaced with a single lambda,
since they were all identical.
The version error text should maybe tell the user to update Advanced
Settings instead of OpenVR, since Advanced Settings contains the version
strings in the binary.
No other exit functions were documented on the official docs besides
VR_Shutdown().
Compare old and new pose via a relative quaternion rather than relative yaw, then calculate the resulting yaw-difference from the quaternion in one go.
Since version strings are displayed in logs and on the main screen, this
will prevent situations where the master branch is confused with the
2.8.0-release branch.
The 2-8-0-release file was a one time thing because the version numbers
were already changed, it should not be created for future releases.
The separate pause and play buttons necessitated changing between them
to signal that state had changed. Replacing it with a combined
pause/play button sidesteps all the issues in syncing up when which icon
should be shown.
The old QML was a giant mess of implementation details and logic.
Reducing the buttons to only 2 essential properties allows the
MediaControllerKeys object to be more easily understood.
Moving the MediaControllerKeys into its own QML file allows the
resulting page to be more easily understood and individual pieces
swapped in and out.
The current QML directory structure is non-existent, breaking parts down
into cohesive folders will allow for easier understanding of the bigger
picture.
* use QStandardPaths to get resource locations
While this shouldn't change behaviour for windows, it allows installing the resource files seperate from the binary on unix systems
* initialize battery overlay handles to 0
* Added Manual Override Checkbox
* added profile logic/synch fixed bug with profile
* Added Function definitions + re-arranged code into more logical blocks
* formatting and fixed reset function in steamvrtabcontroler
* updated documentation
* removed some comments(for later standardization), params as const (where applicable), changed SS minimum value to .2 to match with steamVR minimum
* changed c style cast to c++
* re-applied formatting
* removed un-used lines in steamvrtabcontroller.h
.pngs were chosen because the .svgs were only available in black. Qt
currently does not have an easy way of changing colors. The rest of the
interface icons are white, so getting them in white was necessary.