Commit Graph
317 Commits
Author SHA1 Message Date
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
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
Kung-vr 5ee667a56b Merge pull request #50 from OpenVR-Advanced-Settings/new-master
Rename version strings to 2.8.0-dev
2019-01-17 01:04:08 +09:00
Vasily 474b1a7587 Rename version strings to 2.8.0-dev
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.
2019-01-16 16:30:38 +01:00
username223 b7572f550c Merge pull request #49 from OpenVR-Advanced-Settings/2.8.0-release
Release 2.8.0
2019-01-16 16:29:51 +01:00
Vasily 008b516a2f Release 2.8.0
This commit should change version numbers, but since they're already
changed it'll add a file that should be removed next commit.
2019-01-15 18:14:40 +01:00
Kung-vr 59817aad1c Merge pull request #48 from OpenVR-Advanced-Settings/rotate-resetbutton-fix
Apply fix for reset button rotation from alpha-kung branch
2019-01-16 01:51:46 +09:00
Kung-vr 089862e876 Apply fix for reset button rotation from alpha-kung branch 2019-01-15 23:23:34 +09:00
Kung-vr 18a712f7fa Merge pull request #46 from OpenVR-Advanced-Settings/media-keys
Refactor Media Control Keys QML into smaller bits
2019-01-14 02:35:36 +09:00
Vasily 9aaaf20577 Replace pause and play buttons with combined pause/play
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.
2019-01-13 17:57:15 +01:00
Vasily f5000a0ee0 Refactor Media Control Keys QML into smaller bits
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.
2019-01-13 16:47:38 +01:00
Robin Appelman e75a4c2353 use QStandardPaths to get resource locations (#44)
* 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
2019-01-12 16:34:45 -06:00
username223 b418c76315 Merge pull request #42 from OpenVR-Advanced-Settings/media-keys
Update keyboard functions, Add media control keys to Utilities page
2019-01-12 22:24:07 +01:00
username223 edbecb089e Merge branch 'master' into media-keys 2019-01-12 21:56:38 +01:00
Vasily a5da5b7108 Remove png files 2019-01-12 21:55:44 +01:00
ykeara 95b7eaa664 SteamVRTab SSOverride update (#40)
* 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
2019-01-12 14:49:07 -06:00
ykeara d308c6005f resized svg back to original hackish fix 2019-01-12 14:44:43 -06:00
ykeara 50fe6748e9 changed size to 50x50 of svg 2019-01-12 13:38:18 -06:00
ykeara df35008e30 added white svg's 2019-01-12 13:33:26 -06:00
Vasily 18b87797e9 Update screenshot 2019-01-12 19:43:35 +01:00
Vasily d9d6b0806e Add underline to Media Control Keys 2019-01-12 19:42:03 +01:00
Vasily 566165da39 Update readme with new feature 2019-01-12 19:22:27 +01:00
Vasily 4829ce7c8a Add QML for audio buttons and add pngs
.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.
2019-01-12 19:14:59 +01:00
Vasily ace455d3d3 Add media functions to UtilityTabController 2019-01-12 19:14:57 +01:00
Vasily 7da9d0e61f Implement new media keys for Windows 2019-01-12 19:14:57 +01:00
Vasily faa6ccc580 Refactor sendKeyboard functions to new funcs, propogate constness
The sendKeyboardBackspace function was used with a non-const parameter
throughout the entire inheritance hierachy. Const has been added to
every parameter for the reasons you add const.
2019-01-12 19:14:56 +01:00
Vasily 73f9766de7 Add higher abstraction funcs for sending keystrokes, add const parms
The original functions had the API details of sending keys absolutely
correct, but they were cumbersome to use due to not abstracting away the
press and release aspect and manual creation of INPUT structs.

The manual management of objects also saved a few operations, but with
the frequency that these functions are called it's probably better to
have more abstract code than preventing a 28 byte object from being stack
copied twice every 2 seconds or so.
2019-01-12 19:14:55 +01:00
username223 fca227f9c7 Merge pull request #39 from OpenVR-Advanced-Settings/refactor-singleton
Refactor OverlayController to be implemented as RAII object instead of global singleton
2019-01-11 23:21:30 +01:00
Vasily 148acf08ef Prefix OverlayController TabController members with m_ 2019-01-11 23:04:57 +01:00
Vasily d4fbdf5877 Prefix additional member variables in OverlayController with m_ 2019-01-11 23:04:56 +01:00
Vasily 65d1c8da38 Prefix desktopMode and noSound member vars with m_
This keeps consistency with the rest of the class and reduces possible
confusion, especially when member vars and parameters have the same
name.
2019-01-11 23:04:56 +01:00
Vasily 6ce10bd2f0 Change OverlayController from singleton pattern to regular RAII
The singleton pattern was poorly implemented and didn't provide the
benefits usually associated with the singleton pattern, with all the
negatives.

Refer to this github issue:
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/29
2019-01-11 23:04:55 +01:00
Robin Appelman 227757bd5c Merge pull request #33 from OpenVR-Advanced-Settings/AudioDeviceChangedFix
Fixed audio devices swapping on device hw changes
2019-01-11 19:00:45 +01:00
Kung-vr a55b127366 Fixed audio devices swapping on device hw changes
When audio devices connected or disconnected from the system, the default audio device swapped around. This was because of QML setting index 0 on ComboBox.model changes. onCurrentIndexChanged was calling setPlaybackDeviceIndex() / mirrorDevice/ micDevice etc... in the audio tab controller and actively setting the audio device index to 0 momentarily. Changing onCurrentIndexChanged to onActivated allows the ComboBox to only actively command the audio tab controller in direct response to user interaction.
2019-01-12 00:33:55 +09:00
Kung-vr ad93d4265d Improved Valve Knuckles PTT trigger feel (#32) 2019-01-10 12:00:39 -06:00
Robin Appelman 697e95dffc Merge pull request #30 from OpenVR-Advanced-Settings/SSReproFix
SteamVR tab update.
2019-01-10 15:36:52 +01:00
ykeara ed8587703e updated documentation minor formatting change in QML 2019-01-09 20:50:50 -06:00
ykeara 15fa0ac47a fixed naming bug in QML and formatted/cleaned up 2019-01-09 20:32:39 -06:00
ykeara 813a2b1d3f removed compositor super sampling added error checking for motion smoothing 2019-01-09 20:03:41 -06:00
ykeara 454131f0a0 replaced locally created api keys with proper api keys 2019-01-09 19:25:14 -06:00
ykeara b374ff42f5 cleaned up dead code 2019-01-08 22:46:30 -06:00