Commit Graph
370 Commits
Author SHA1 Message Date
Kung-vr d529b21f3e Clean up before PR to master 2019-01-28 03:31:52 +09:00
Kung-vr cca61b3ee7 Merge branch 'master' into alpha-kung 2019-01-28 03:14:42 +09:00
Kung-vr 7dce218529 Merge pull request #69 from OpenVR-Advanced-Settings/utilities-qml
Move the utilities page QML into its own folder and extract components
2019-01-28 03:12:49 +09:00
Kung-vr f60be85a58 Merge branch 'master' into utilities-qml 2019-01-28 02:55:30 +09:00
Kung-vr 3e9ec4a48d Merge branch 'master' into alpha-kung 2019-01-28 02:53:24 +09:00
Kung-vr 775aaa7cd0 Support new steamvr input for playspace rotate and move 2019-01-28 02:45:29 +09:00
Vasily 70e7556de8 Move components into their own directories
This prevents the import "utilities_page" from also importing the
subcomponents. They should not be in the global namespace.
2019-01-27 10:29:57 +01:00
Kung-vr 310fa36828 Merge pull request #68 from bdonlan/crashfix
Fix NULL dereference in OnDefaultDeviceChanged
2019-01-27 12:56:25 +09:00
Bryan Donlan ac0f957488 Fix NULL dereference in OnDefaultDeviceChanged
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.
2019-01-26 18:18:45 -08:00
Vasily 629c4e2edb Separate individual components into qml files
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.
2019-01-26 20:29:14 +01:00
Vasily a94c37b858 Move UtilitiesPage and media_keys into 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.
2019-01-26 18:32:29 +01:00
Kung-vr de4cc5e88f Merge branch 'master' into alpha-kung 2019-01-25 00:14:33 +09:00
username223 25d2854248 Merge pull request #64 from OpenVR-Advanced-Settings/compiler/readme-updates
Update Travis CI to use clang in addition to g++, update readme, update standard to C++17
2019-01-24 06:51:05 +01:00
username223 b661e3f8b3 Merge branch 'master' into compiler/readme-updates 2019-01-23 22:51:44 +01:00
Vasily 5f17377329 Add explanation to disabled warning in .pro file
MSVC does not yet support non experimental ways of selectively disabling
warnings for some files.
2019-01-23 22:44:09 +01:00
Vasily 168d9d38fd Remove C++17 testing code
Featured C++17 features to make sure compilers would be able to handle
future C++17 features.
2019-01-23 22:33:00 +01:00
Vasily c0c824d380 Remove C++17 flags from g++ and clang
The flags are already being applied by QMAKE.
2019-01-23 22:18:28 +01:00
Vasily 20341021c5 Update travis to use clang and g++7 2019-01-23 22:16:45 +01:00
Vasily 43bf20da45 Fix msvc and clang-msvc warnings with C++17
The codecvt header has been deprecatd for C++17, but no replacement has
been specified in the standard. It is possible to use the Windows
specific MultiByteToWideChar() and WideCharToMultiByte() from
<Windows.h> instead, however the codecvt header still works so there's
no reason to change it until a proper replacement has been specified in
the standard.

It is additionally necessary to manually set the standard for clang-msvc
to C++17.
2019-01-23 20:43:44 +01:00
Vasily d04cf32863 Update CI badges, update preview version link
Having the CI on their own line prevents the initial line from getting
way too long.

The preview version link should not show in development alpha branches,
but only the relatively tested master.
2019-01-23 20:03:36 +01:00
Vasily 80a28bf744 Update readme information
The Known Bugs section was removed because that's literally why the
issue tracker exists.
2019-01-23 19:57:22 +01:00
Vasily 583a62fb9c Update readme badges to reflect C++17 and Python dependency
The badge had not been updated for C++14 when we made the change. It had
also not been updated to reflect the dependency on Python during the
creation of the build script.
2019-01-23 19:39:29 +01:00
Vasily cd6403b8ff Update .pro file and add test C++17 statements to main
The test statements are making sure C++17 features are enabled on all
compilers. They should not be pushed to master as they are.
2019-01-23 19:31:03 +01:00
username223 1fc00e054b Merge pull request #61 from OpenVR-Advanced-Settings/alt-enter
Add Alt+Enter button to keyboard keys
2019-01-23 19:22:23 +01:00
Vasily 67b9869e44 Update UtilitiesPage.png with the Alt+Enter button
Additionally, the pause/play button has also been changed since last,
but the image wasn't changed.
2019-01-23 18:50:52 +01:00
Vasily 0a49c7a717 Add Alt+Enter button to Utilities page, update Win Alt+Tab func
Requested in this reddit post:
https://www.reddit.com/r/Vive/comments/agnvux/advanced_settings_280_motion_smoothing_audio_and/ee7muqo/

Use case is toggling full screen mode on applications.

The Alt+Tab function has been updated with a constexpr var that reduces
duplication in the function calls and makes the keys even more explicit.
2019-01-23 18:49:10 +01:00
Kung-vr d2b7935983 Fix rotation counter during rotation drag (test build) 2019-01-24 01:08:41 +09:00
Kung-vr 499a0e3ede Fix rotation counter stats during rotation drag 2019-01-24 00:58:15 +09:00
username223 c10e45d2ab Merge pull request #59 from OpenVR-Advanced-Settings/new-input-api
Add IVRInput bindings for media keys
2019-01-22 20:56:10 +01:00
Vasily 7531fc61ea Add browser bindings viewer to readme
Collecting information in the readme prevents users from having to
Google it.
2019-01-22 20:36:42 +01:00
username223 4d835c7d31 Merge branch 'master' into new-input-api 2019-01-22 19:21:05 +01:00
Vasily 1ae434e987 Swap recommended ways of getting bindings to show up
Running with "-bindingsinterface" does not allow for continually
updating the bindings or playing around with them. While changing the
unix time in the vrappconfig is slightly harder for casual users, it
will also give them a way better user experience.
2019-01-22 18:35:50 +01:00
Kung-vr ec0d35bf0d Merge branch 'master' into alpha-kung 2019-01-22 14:00:22 +09:00
Vasily 667711246e Add media key bindings, update docs
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.
2019-01-21 21:19:28 +01:00
ykeara b3a9e5ea8d fixed default audio profile display (#58)
* fixed default audio profile display

* fixed formatting
2019-01-21 14:04:06 -06:00
Vasily 3a62ec89be Add comment to openvr_init.cpp 2019-01-20 22:54:30 +01:00
Vasily 4152333f20 Update documentation to reflect new bindings interface 2019-01-20 22:34:20 +01:00
Vasily 5ead96bc98 Update installer script to include action manifest 2019-01-20 22:16:02 +01:00
Vasily 706f21ebea 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).
2019-01-20 22:05:21 +01:00
Vasily 0c71c289b9 Finalize API and add comments 2019-01-20 20:13:05 +01:00
Vasily 01b0070e66 Rename steamivrinput.h/.cpp to ivrinput.h/.cpp
The name is shorter and identical to the folder name, emphasizing that
this is the main file in this module.
2019-01-19 21:32:12 +01:00
Vasily d7e3df185b Refactor IVRInput logic into several classes
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.
2019-01-19 21:25:15 +01:00
Kung-vr 7da42f54ec Merge branch 'master' into alpha-kung 2019-01-20 01:10:27 +09:00
Vasily 8bcab9b2c0 Refactor ivrinput functions to be more generic 2019-01-19 16:42:49 +01:00
Vasily 1585322c9d Move action manifest files to src/package_files
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.
2019-01-19 16:42:03 +01:00
Robin Appelman 586ee558c4 determine vrinput manifest path dynamically 2019-01-19 16:42:02 +01:00
Vasily 5accfd478a Implement beta IVRInput system for testing
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.
2019-01-19 16:41:59 +01:00
username223 1ff3b6a335 Merge pull request #57 from OpenVR-Advanced-Settings/refactor-openvr-init
Refactor OpenVR init code to separate class
2019-01-19 16:36:57 +01:00
Vasily edaf982149 Prefix openVrInit with m_, like other member objects 2019-01-19 16:23:17 +01:00
Vasily d8f179fdf7 Refactor OpenVR init code to separate class
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().
2019-01-18 23:28:17 +01:00