Commit Graph
299 Commits
Author SHA1 Message Date
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
ykeara 123c38c586 Fixed Profile Viewing 2019-01-08 21:31:13 -06:00
ykeara 9351267fb5 fixed naming bug in qml 2019-01-08 21:02:52 -06:00
ykeara 7bd02049a2 added Motion Smoothing toggle 2019-01-08 20:37:22 -06:00
ykeara 2fadca76d0 Commented out reprojection logic 2019-01-08 17:33:48 -06:00
username223 16f5438ab0 Update OpenVR dependency to version 1.1.3b (#28)
* Update OpenVR from an unknown version to 1.1.3b

There shouldn't be any breaking changes.

* Add removed variables from old OpenVR version

The strings are the names of variables in steamvr.vrsettings in
C:\Program Files
(x86)\Steam\steamapps\common\SteamVR\resources\settings\

The string allowReprojection leads to warning log spam on some
occasions.

For more information see this github issue
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/25.
2019-01-08 16:53:16 -06: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
ykeara 6cd4a56d73 Added CLA (#18)
* Added CLA

added CLA to for better distribution options

* added additional License requirements to TOC
2019-01-06 14:29:32 -06:00
username223 b10581674d Merge pull request #17 from OpenVR-Advanced-Settings/update-win-builds
Update windows build system, add clang-msvc to CI, add versioning to artifacts
2019-01-05 21:07:49 +01:00
Vasily 3e05bb07f9 Change Win build script batch file from test.bat to current_build.bat 2019-01-05 20:43:41 +01:00
Vasily 4787933a52 Add exit condition checking to build, deploy, package cmd files
Without the line checking the exit code, the script will not fail on a
failure from a subsystem.
2019-01-05 20:31:34 +01:00
Vasily 1df8e88e3d Change RM to DEL in build, package, deploy cmd files
RM is the Linux command, DEL is the Windows equivalent.
2019-01-05 19:53:34 +01:00
username223 6c26507945 Merge branch 'master' into update-win-builds 2019-01-04 20:56:39 +01:00
ykeara 553dbe4e12 Merge pull request #16 from ykeara/master
Default Audio Profile
2019-01-04 13:49:22 -06:00
ykeara 20914b4e71 fixed phantom double line 2019-01-04 13:38:20 -06:00
ykeara 4bb1ba7402 Merge branch 'master' of https://github.com/ykeara/OpenVR-AdvancedSettings 2019-01-04 13:35:21 -06:00
ykeara 15855c4564 fixed minor code formatting errors 2019-01-04 13:34:52 -06:00
Vasily d2ef036b8e Add build_scripts\win\test.bat to gitignore
Also reverse slashes to make git recognize the path.
2019-01-04 18:30:31 +01:00
Vasily 81d8c516a8 Add developer docs file
This allows devs on the project to write useful information that might
not fit anywhere else, or might be applicable to multiple things.
2019-01-04 17:07:52 +01:00