* Revert "Add dedicated image for CircleCI builds"
This reverts commit 44a5d3eed0.
With how little we use the Docker hub features it does not make sense to
have external dependencies on it.
* Add `qt512websockets` to CI build
This is necessary for Ykeara's feature branch.
Compiling C++ on various different platforms with as many out of tree
dependencies as we have is volatile at best.
In order to prevent a third party warning from ruining the build for
people who don't care about third party warnings, we remove
warnings-as-errors by default.
They are still enabled by default on CI.
This essentially just bakes in all the dependencies and other third
party tools that we need, preventing them from being downloaded on every
new CI run.
TravisCI does not have non-enterprise support for custom images without
a lot of hassle.
Previous way of controlling when controllers were run was split among
the different controllers, meaning that third parties would require
knowledge of internal state of controllers in order to be on the same
update schedule as them.
This refactor moves the logic into a seperate class.
Additionally, it also stops the use of the `adjustUpdateRate` function
on all tab controllers, since it broke the prime-number-ability of
less collisions.
The old OpenVR overlays did not function for unknown reasons, and it was
not possible to get them to work.
With this a white overlay with ALARM ACTIVATED will be shown for 3 seconds.
It's not pretty, but it effectively communicates that an alarm has been
activated.
This fixes
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/417
Saving a profile with only visibility changed, the saved struct looks
like
bools\1\bools=false
bools\2\bools=true
bools\3\bools=false
bools\4\bools=false
The load function expects 2 bool values before loading
`includesVisibility`, leading it to getting a false value (actually
includesFadeDistance).
Making the struct save the `chaperoneGeometryQuadsValid` that it expects
to be saved there fixes the issue.
This bug highlights issues with the current object settings system, in
that debugging is unnecessarily tedious and difficult.
Previously logic was duplicated for Linux/Windows.
Additionally, Linux was
```cpp
if ( isModifier( token ) )
{
sendKeyPress( token, KeyStatus::Down, display );
if ( noKeyUp )
{
heldInputs.push_back( token );
}
continue;
}
```
while Windows was
```cpp
if ( isModifier( token ) )
{
inputs.push_back( createInputStruct(
convertToVirtualKeycode( token ), KeyStatus::Down ) );
if ( !noKeyUp )
{
heldInputs.push_back( token );
}
continue;
}
```
(notice difference in noKeyUp if statement which was a bug on Linux.
Windows was the correct version and it has been kept.
It is unknown if gcc uses the O3 optimization levels passed to the
compilation of individual cpp files, or if it needs O3 passed to the
linker as well.
The hash of the final binaries are different, thus O3 is passed to the
linker.
Travis clang does not have the LLVMgold plugin installed.
Disabling LTO is easier than installing the plugin since the CI doesn't
create any artifacts anyway.
Qmake attempts to invoke the linker with the default `g++` binary even
when we changed the binary. This will compile error when using LTO.
For clang:
```
/usr/bin/ld.gold: error: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so: could
not load plugin library: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so:
cannot open shared object file: No such file or directory
```
For GCC:
```
lto1: fatal error: bytecode stream generated with LTO version 6.0
instead of the expected 4.1
```
`optimize_full` is an undocumented config option that enables O3 on
Linux.
On Windows it does not change the command line, but the final build is
slightly different for unknown reasons.
Source outputs must all be moved to new default source.
Reference topic
https://askubuntu.com/a/72076
* Adds microphone controls on Linux via PulseAudio (PA) for several
points in
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/43.
It can not be overstated how unsuited the public AudioManager API is for
using the PA API.
It can also not be overstated how undocumented and horrible the PA API
is. The PA way of doing audio is very unlike the Windows way of doing
audio, which the AudioManager is heavily influenced by.
Since I don't have a Linux machine I have not been able to personally
test this. https://github.com/feilen/ has graciously helped with
testing.
PulseAudio is very undocumented and not very widely used for what we
need outside of official utilities. As such there's most likely a better
way of doing things than I've done.
Additional information can be found at
https://github.com/username223/pulseaudio-device-changing.
The "complex" PA API is asynchronous. Since our current AudioManager is
running synchronously and would not work asynchronously (functions are
expected to return valid data on function return) it is necessary to
massage the PA API until it runs synchronously.
This is done with a general workflow of
1. Register a callback function (`pa_context_get_source_info_list()`,
for example).
2. Run the PA loop through `customPulseLoop()`. This will trigger
any registered callbacks. Sometimes a `void*` is passed through the
callback that can be used for custom data. `successCallback()` uses
this to set the success variable.
3. Run the callback function and do required work.
4. Return to original function, do work or return values.
It is not possible to run a `customPulseLoop()` inside of an already
running loop (inside a callback), as this will lead to a PA assert
error on runtime.
chaperoneGeometryQuads was converted from an implicit pointer array to a
std::vector because the only thing the pointer array did was hide the
fact that it was an array.
Audio profiles are not currently activated due to SteamVR changes.
micVol has been changed to default initilize to 1.0f since that was
being applied in the settings load anyway.
Looping through the vectors was done for almost all vectors
individually. Because there are some weird off by one issues that could
crop up it's easier to just have a function for it.
Passing a C style string (const char*) to any of the templated functions
would lead to a compile error. It was necessary to wrap the raw string
in a std::string call, which is obviously not ideal.
Using automatic type deduction was necessary because `std::vector<const
char*` is not the same as `std::vector<std::string>`.
Release log:
https://github.com/ValveSoftware/openvr/releases/tag/v1.9.16
```
Removed sync function. Saving of settings is controlled automatically by
the system now. All existing calls to Sync can be deleted. Calls to sync
using old APIs do nothing.
```
As of SteamVR 1.10.1 the overlay width feature has been implemented by
Valve in the standard settings.
OpenVR features related to overlay translation have been removed and the
main reason for including them (multi monitor setups) have been solved
by Valve giving each screen an individual overlay.
For some unknown reason, the jump to Qt 5.14.0 broke the way we're using
the COPIES/file_copies function only on MSVC.
The `mkspecs/features/file_copies.prf` file itself has not been changed.
Enabling the switch on release builds will optimize the binaries as
normal, but will still include debug symbols. This is advantageous for
bugs that do not show up in debug builds without optimizations.
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.
The `customTickRateMs()` function is being called every millisecond,
adding the verification to every call leads to unnecessary overhead.
The tick rate is verified when loading and when saving.
After looking at the assembly output it became apparent that the Windows
compiler did not compile out the `getSettingsController()` function
call.
This led to an unnecessary function call in order to get the
SettingsController. Turning it into a static object in the compilation
unit scope removes this function call and turns getSettings call into a
single instruction (not counting zeroing the register for comparison and
the jump instruction afterwards).
----
Adding the following code to the `main` function:
```cpp
f ( settings::getSetting( settings::BoolSetting::UTILITY_vrcDebug ) )
{
LOG( INFO ) << "Enabled";
}
else
{
LOG( INFO ) << "Disabled";
}
```
Leads to this with the `getSettingsController` function:
```assembly
[...]
47 if ( settings::getSetting( settings::BoolSetting::UTILITY_vrcDebug ) )
0x7ff6c96819a0 <+ 1024> call AdvancedSettings!settings::getSettingsController (00007ff6`c96cd280)
0x7ff6c96819a5 <+ 1029> xorps xmm0,xmm0
0x7ff6c96819a8 <+ 1032> cmp byte ptr [rax+5FCh],0
0x7ff6c96819af <+ 1039> je AdvancedSettings!main+0x4fd (00007ff6`c9681a9d)
49 LOG( INFO ) << "Enabled";
0x7ff6c96819b5 <+ 1045> mov qword ptr
[rsp+288h],r15
0x7ff6c96819bd <+ 1053> mov qword ptr
[rsp+290h],rsi
[...]
```
And this without the function:
```assembly
[...]
47 if ( settings::getSetting( settings::BoolSetting::UTILITY_vrcDebug ) )
0x7ff7d97a19bb <+ 1019> xorps xmm0,xmm0
0x7ff7d97a19be <+ 1022> cmp byte ptr [AdvancedSettings!settings::settingController+0x5fc (00007ff7`d9854d4c)],0
0x7ff7d97a19c5 <+ 1029> je AdvancedSettings!main+0x4f3 (00007ff7`d97a1ab3)
49 LOG( INFO ) << "Enabled";
0x7ff7d97a19cb <+ 1035> mov qword ptr
[rsp+288h],r15
0x7ff7d97a19d3 <+ 1043> mov qword ptr
[rsp+290h],rsi
[...]
```
Notice the missing `call AdvancedSettings![...]` without the function
and that the settings call literally cannot be made any faster.
The color*New settings were a hotfix for 4.0.1 where wrong settings were
applied to the colors leading to a black headset screen.
The New postfix is to manually prevent the settings file from reading
the old values.