Commit Graph
44 Commits
Author SHA1 Message Date
ykeara 48a7cf4b7f 5.8.3 (#658)
* add delay if interface not found

* adjust initialization behavior

* pushed for debugging reasons for concerned parties

* comment out simple recenter

* remove old style motion, some minor optimizations

* optimize default case check

* optimized default condition

* change manifest install behavior to trigger on desktop mode as well

* add desktop mode binding launch

* add tracker overlay option to utils

* commit to check status

* attempt to fix native LH issues with chaperone when exiting

* add desktop mode toggle and some cleanup

* remove adjust chaperone

* remove clang format from ci, increment version, cleanup

* update circle ci

* fix conversion warning

* add F13-19 to keyboard parser

* add additional logging around failure to initialize

* add unsaved changes

* update version 5.8.1

* fix some collisions in enum declaration

* add controller powers on steamvr, and no HMD to steamvr tab, increment version

* slightly alter drag movement, fix qml issue

* code cleanup

* fix logspam/attempt to delete non existant overlays

* increment version 5.8.3
2024-02-21 12:38:00 -06:00
ykeara 565d25ea15 No Render Fix, Color/Brightness Sort Order, readme adjustment (#550)
* Adjust Brightness/Color Overlay Sort Orders for better app complienc

* No Overlay Render Attempt fix

* change readme update version string
2021-02-26 17:34:44 -06:00
ykeara dca1e18e0e CenterMarker Rotation Fix + Misc (#458)
* add native chaperone option

* refactored overlaywrapper error handling

* added reset all settings

* added reset all settings option

* clarified driver bounds language

* fixed naming  schema of turn settings

* fixed qml issue

* marked errors in settings

* fixed rotation of center marker and cleaned up

* ci test

* removed debugging code

* fixed comment

* fixed rotation.... made messy

* fixed crash when centermarker new was on at launch

* added settings to scroll view

* fixed some initialization issues w/ center marker and some race conditions

* updated Documentation to be more correct/concise about openGL rendering Information issue 457

* changed default behaviour of chaperone bounds to be un-checked to be consistant w/ other settings (default is unchecked)

* cleaned up code around centermarker overlay

* removed unused variables, changed scope of some existing

* code naming cleanup

* more rename

* updated Version strings for 5.1.1 release

* updated string to be more concise
2020-06-02 12:10:21 -05:00
Chelsea Jaggi 8b5d5ff3d6 Set a static DPI before rendering in-VR overlay (#370)
We expect a standard 96DPI display rendering when creating the overlay,
but system DPI can interfere with this. Setting
QCoreApplication::setAttribute(Qt::AA_Use96Dpi) resolves this.

https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/369
2020-03-10 16:26:22 -05:00
Vasily eed01ed5a8 Remove unneeded QSettings functions and imports 2020-01-30 10:36:21 +01:00
Vasily c5c64cd66d Remove unneeded import in main 2020-01-08 21:18:45 +01:00
Vasily e71bc7b1b3 Add settings object API
Documentation is in `docs/specs/Settings-Object-API.md`.
2020-01-08 21:18:45 +01:00
Vasily 752295fa63 Make currently used settings be printed out at application start
Due to the SettingsController being a static object it will be
initialized before the main method has been run. This will cause
easylogging to log using the default logging style instead of the
defined application style. Because of this the settings are propogated
up through a function into the main method.
2019-12-10 08:28:41 +01:00
Vasily c1690056cc Add settings API and specification
The details of the API are in the `/docs/specsSettings-API.md` file.

The enums do not list all available settings, more are to be added as
the settings API replaces inline QSettings calls.
2019-12-03 08:26:10 +01:00
Vasily f86221d8fd Change logging call in main
Previously no file was being output.
2019-03-19 16:10:35 +01:00
Vasily 04c59d5f20 Convert setup to new paths 2019-03-19 16:10:35 +01:00
Vasily 6c0ae194a5 Convert main to new paths 2019-03-19 16:10:35 +01:00
Vasily 62dcea6943 Replace dedicated functions with single binary function
There are only 1 or 2 calls to specific directories in the codebase,
hence this is unnecessary and just leads to bloat.
2019-03-19 16:10:35 +01:00
Vasily 5b9e94869c Move application strings into separate namespace
Them being in the overlay controller required them to be static, which
forces the compiler to give them a memory location at compile time. They
also don't really fit into the overlaycontroller.
2019-03-11 11:24:57 +01:00
Vasily ef223b90a1 Remove end user changing logging settings
Fixes
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/63

Removes the ability for end users to change logging settings. This was
deemed unnecessary because logging is a developer troubleshooting tool
and users being able to change it could almost only introduce problems.

People who want to change the logging settings can compile from source.
2019-03-10 23:12:26 +01:00
Vasily fd4ab3b0e5 Remove old comments 2019-03-10 23:12:26 +01:00
Vasily 293ca21af5 Convert openvr_init from class to function
Since the OpenVR initialization code is no longer inside the
overlaycontroller there is no need for it to be available during object
construction. Therefore it doesn't make sense to have it be an object.

The shutdown call was completely removed because shutdowns are handled
by an OpenVR event that calls the relevant shutdown code. The destructor
for the old object was never called, removing it adds clarity to the
actual operation of the code and also removes unnecessary code.
2019-03-10 23:12:26 +01:00
Vasily 37e0366e9d Move OpenVR init function out of Overlaycontroller
This prevents the issue of OpenVR not being initialized in constructors
of other objects, and there's really no reason not to do it.
2019-03-10 23:12:26 +01:00
Vasily 45bb199a0d Replace arg parsing function with Qt built ins
This automatically provides version and help functions, and offloads the
arg parsing to a third party lib.
2019-03-10 23:12:26 +01:00
Vasily 5d2901be33 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.
2019-03-10 23:12:26 +01:00
Vasily 84be2090c8 Move setup code in main to separate file
This makes it easier to find the entry point for the program and also
moves a lot of implementation out of the main.cpp file.
2019-03-10 23:12:26 +01:00
Vasily 76507bd602 Move common elements into /common/ and change imports
Elements work like they've always done, this just moves the commonly
used components away from the global namespace.

The qmldir file still does something, although at this point it is
unknown exactly how it's used and whether or not it could be changed to
simplify imports across the block.
2019-02-02 16:09:01 +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
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
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
username223 9c7022f802 Fix QML error spam from MyStackViewPage and PlayspacePage (#24)
* Move logging set up into own function

This does not affect the ability to log, the logging macros are
available globally.

* Clean up logging logic and add comments

The logic to find the logging location was broken, in that it always
placed the logs in the directory of the executable.
It was supposed to place the logs in
AppData/Roaming/matzman666/OpenVRAdvancedSettings/AdvancedSettings.log,
but it hasn't done this since at least git tag "v2.7". Since the change
hasn't been documented anywhere it is assumed to be an unintentional
regression.
The settings file is also currently placed in
AppData/Roaming/matzman666/OpenVRAdvancedSettings.ini, so this commit
undoes the probable regression until a strategy can be developed for
changing all paths at once.

* Move command line arg logging calls and add to manifest calls

The LOG_IF macros are cleaner than if blocks, and they do not need to be
in the middle of the Qt logic inside a giant try block.

* Remove unused QCoreApplication constructor in manifest logic

The object is not used in any of the manifest logic functions and
running without the remove/install manifest calls does not use it
either.

* Unindent logic in installManifest

The error checking was unnecessarily done in an else block. Moving it
into an if block and negating the result does the same but leaves the
rest of the logic at a much smaller indentation level.

* Change array in installManifest to be 0 intialized

Not zero initializing could lead to strange bugs if the terminating null
isn't there.

* Move manifest install/removal to separate function

The manifest handling is tangential to the actual main operation of the
program, hence moving it to a separate function improves readability of
the actual program.

The enum ReturnErrorCode has also been moved to the top in order to be
available to all functions. On introspection it is revealed that it
should always have been placed at the top.

* Unindent logic in removeManifest

The logic is unnecessarily indented, leading to harder to follow logic.

While the current logic isn't that hard to understand, it's better if it
follows the same rhythm as installManifest, which errors checks the same
way with a !QFile::exists( manifestQPath ).

* Move manifestPath out of install/removeManifest

Moving the variable outside of the functions reduces code duplication
and increases the versatility of the functions.

Variable was renamed from manifestQPath to manifestPath, because the Q
does not add anything to the name except (maybe wrongfully in the
future) typing a variable that has been typed with 'auto'.

The default variable has been removed, as it did not improve readability
at all.

* Rename installManifest to handleManifestInstallLogic

The new name better reflects the overall purpose. installManifest should
be a function that only installs the manifest.

* Move manifest related things into manifest namespace

* Move manifestInstallation logic into functions

The logic becomes clearer when replaced by function names instead of
just blocks of error checking.

* Refactor installManifest into separate functions

The uses for the removeManifest and installManifest functions could be
boiled down to three separate use cases:
    * If the application was passed the "-installmanifest" arg:
        Reinstall the manifest and enable application autostart.
    * If the application was passed thed "-removemanifest" arg:
        Remove the manifest.
    * If the application was not passed "-desktop" and also not passed
    "-nomanifest" (basically every start):
        Install the manifest.

Where reinstalling means to remove the manifest if installed and then
install it.

The relatively complex logic in installManifest hid this logic behind
several if statements and changing what the "alreadyInstalled" bool
signified.

The refactored functions should make everything easier to understand.

* Add variable for manifest name

* Rename variables in main to camelCase

This appears to be the style chosen for the majority of the project.

* Change cerr to be LOG(ERROR) and add logging for manifest completion

The cerr calls are not likely to be seen by anybody. Logging them as
ERROR will make sure they are available for diagnostics.

* Add comments for new manifest functions

* Reorder namespaces and functions in main

Namespaces and functions are now ordered as they appear in main.

* Add static_cast to height and width in func call in main

width and height are "qreal" (typedef for double). Having them
implicitly cast to int leads to warnings on some compilers, and can lead
to doubt whether they're supposed to be converted.

* Move organizationName and applicationName into overlaycontroller.h

The string have been moved to static constexpr autos inside the
overlaycontroller.

Them remaining static means that they are included in the final binary,
even if they don't need to be included as static.

They should probably also not be directly gotten, instead being offered
up as static getters, but it's better to do them all at the same time in
a specific commit for that.

* Add comment to installApplicationManifest

Describing that OpenVR must be initialized before the function is
called.

* Change QApplication var name and add comments

The previous QApplication was named "a". This is obviously not
sufficient for such a large part of the application, even if the class
is rather boilerplate heavy.

* Add comments to Qt portions of main

Some things have been left uncommented. That's because I don't know what
it does.

* Change documentation for command line arguments, logging config

The information under the Desktop Mode header could be rolled under the
"-desktop" command line arg.

Support for the command line args of Easylogging++ and custom logging
files have not been supported for the original developer. Both should
probably be dropped in favor of having the same logging behavior for all
users.

* Remove error causing property from QML MyStackViewPage and PlayspacePage

The properties were causing an error message to be spammed in the log
QML QQuickText: Detected anchors on an item that is managed by a layout.
This is undefined behavior; use Layout.alignment instead.

and

QML RowLayout: Detected anchors on an item that is managed by a layout.
This is undefined behavior; use Layout.alignment instead.

Removing them fixed the spam and didn't noticeably change the appearance
of the pages.
2019-01-07 19:24:20 -06:00
Vasily a49d889ee8 Move easylogging++ include into necessary files
logging.h previously had logic to enable debug logging even on release
builds. This logic was moved to the QMAKE file, hence the logging.h file
is no longer necessary.
2018-12-28 20:07:00 +01:00
Vasily 51057c1d79 Format every single file using .clang-format 2018-12-28 03:06:42 +01:00
Vasily 629c956618 Change variable being shadowed
apperror was shadowing another variable in the scope outside of the if
statement, leading to a warning.

Adding an underscore changes the var name without changing the meaning.
In the future a different structure should probably be chosen for the
statements.
2018-12-27 00:29:08 +01:00
Vasily 1a043b6672 Remove code path that would never be executed 2018-12-26 22:33:26 +01:00
Vasily 62489ed642 Move global level strings into scope of main 2018-12-26 22:32:21 +01:00
Vasily 921d1ae828 Refactor manifest remove/install logic in main
The install/remove manifest logic in main is currently duplicated. This
bloats up main and creates unnecessarily large indented logic. The only
thing that is different between the two large if blocks is a single
function call.

Refactoring to test for which function to call at the latest possible
stage reduces code duplication.
2018-12-22 14:45:49 +01:00
Vasily 3935ebcbb4 Refactor command line argument parsing into function
The command line argument parsing is done in a giant for loop in the
main function. This presents readability and extension problems.

Refactor the big for loop into smaller loops inside the function.

In theory this will affect performance slightly at startup, but when considering
the very low amount of possible command line arguments (5, currently) and the low
amount of arguments being passed on a typical launch (0 or 1, mostly),
the readability improvements are very much worth it.

The string literals have also been moved to the "argument" namespace as
constexpr, in order to avoid potential typos in string literals.

Should the amount of command line arguments increase severely, it might
be necessary to create a structure with only one pass through the
argument loop, but such a situation is very unlikely.
2018-12-22 13:33:13 +01:00
matzman f48b583aca Reimplemented sound effects.
Added chaperone proximity warnings.
Other bugfixes and improvements.
2017-08-15 21:44:29 +02:00
matzman 3f53235b1b Bugfixes and Improvements. 2016-12-22 00:51:17 +01:00
matzman 3000e129e3 Added installer support & installer script. 2016-12-19 21:57:22 +01:00
matzman f922b97e5b Bugfixes and Improvements. 2016-12-17 00:39:48 +01:00
matzman 072d39b771 Updated Readme and some other fixes. 2016-12-09 23:24:59 +01:00
matzman c54ee1b4c0 Some fixes more log statements, and changed version to v2.1. 2016-12-09 22:07:13 +01:00
matzman 57e941d44c Renamed manifest file to avoid confusion. 2016-12-09 00:16:56 +01:00
matzman c14867ad41 Added -nomanifest command line argument that disables vrmanifest
registration.
2016-12-05 00:56:34 +01:00
matzman b766dc72cc Added desktop and no-sound modes.
When -desktop is given on the command line then the settings menu is shown on
the desktop instead of an vr overlay.
When -nosound is given on the command line then there are no sound
effects.
2016-12-04 23:37:00 +01:00
matzman e39c240ff5 Complete GUI overhaul (from Qt Widgets to Qt Quick Controls 2)
Added chaperone profiles
Added separate supersampling sliders for applications/compositor
Added asynchronous reprojection on/off switch
Merged in Microphone Control Overlay
Added Push-to-Talk profiles
Updated to OpenVR 1.0.3
Requires at least SteamVR beta 1477423729.
2016-10-28 18:38:05 +02:00
matzman de0fdb3e1f Inial commit v1.0. 2016-09-11 21:42:12 +02:00