Commit Graph
943 Commits
Author SHA1 Message Date
Vasily 01972546af Update Linux build docs with Git 2020-01-07 23:31:48 +01:00
Vasily 6cdb461af3 Update Qt version in Linux build docs to 5.12.6 2020-01-07 23:31:48 +01:00
Vasily 231b040e62 Update Readme table of contents
TOC created using the `github-markdown-toc` tool from
https://github.com/ekalinin/github-markdown-toc.
2020-01-07 23:31:48 +01:00
Vasily 26471454ef Update docs on Preview builds for Linux 2020-01-07 23:31:48 +01:00
Vasily 4afa87a91d Update Usage section of readme to include Linux 2020-01-07 23:31:48 +01:00
Kung-vr a07a3a95ca Merge pull request #345 from OpenVR-Advanced-Settings/friction
Add friction feature to motion tab
2020-01-03 14:02:15 +09:00
Kung-vr d8f1f4e6b9 Add friction feature to motion tab
#344
2020-01-03 01:25:49 +09:00
ykeara 5a7ad06b1c changed m_k_ to m_ (#341) 2019-12-22 11:23:41 -06: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 2f612f52ae Cache verified customMsTickRate
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.
2019-12-10 08:28:41 +01:00
Vasily c2dff4c863 Move internal settings headers into /internal/ dir
The additional headers are not intended to be public. To reinforce that
it is a bad idea to include these they are put into the /internal/
directory.
2019-12-10 08:28:41 +01:00
Vasily 1465c4a8bd Convert getSettingsController() to global static object
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.
2019-12-10 08:28:41 +01:00
Vasily 7cecc6ab69 Convert m_isOverlayMethodActive to new settings API 2019-12-10 08:28:41 +01:00
Vasily fb1cd0c93f Convert m_colorOverlayEnabled to new settings API 2019-12-10 08:28:41 +01:00
Vasily 117b0f65eb Convert m_colorBlue to new settings API 2019-12-10 08:28:41 +01:00
Vasily 6e0b6d39f8 Convert m_colorGreen to new settings API 2019-12-10 08:28:41 +01:00
Vasily b0b1f44ae1 Remove color*New from settings
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.
2019-12-10 08:28:41 +01:00
Vasily d474af9501 Convert m_colorRed to new settings API 2019-12-10 08:28:41 +01:00
Vasily 287a6139be Convert m_brightnessEnabled to new settings API 2019-12-10 08:28:41 +01:00
Vasily 39ec5267f6 Convert m_colorOverlayOpacity to new settings API
The setColorOverlayEnabled function had a bug where the previous value
would be applied instead of the current value.
2019-12-10 08:28:41 +01:00
Vasily a13b901b88 Convert m_brightnessValue to new settings API 2019-12-10 08:28:41 +01:00
Vasily 0710432933 Convert m_brightnessOpacityValue to new settings API 2019-12-10 08:28:41 +01:00
Vasily ec73c54f3e Convert m_fadeDistanceRemembered to new settings API 2019-12-10 08:28:41 +01:00
Vasily 0c07f0c207 Convert m_chaperoneShowDashboardDistance to new settings API 2019-12-10 08:28:41 +01:00
Vasily 292398fd98 Convert m_chaperoneAlarmSoundDistance to new settings API 2019-12-10 08:28:41 +01:00
Vasily 13c8eabeb0 Convert m_chaperoneHapticFeedbackDistance to new settings API 2019-12-10 08:28:41 +01:00
Vasily 81bbec52b4 Convert m_chaperoneSwitchToBeginnerDistance to new settings API 2019-12-10 08:28:41 +01:00
Vasily d47c570537 Convert m_disableChaperone to new settings API 2019-12-10 08:28:41 +01:00
Vasily be6a21d321 Convert m_enableChaperoneShowDashboard to new settings API 2019-12-10 08:28:41 +01:00
Vasily b6f0e22770 Convert m_chaperoneAlarmSoundAdjustVolume to new settings API 2019-12-10 08:28:41 +01:00
Vasily 3632fc03d5 Convert m_chaperoneAlarmSoundLooping to new settings API 2019-12-10 08:28:41 +01:00
Vasily 54022e0438 Convert m_enableChaperoneAlarmSound to new settings API 2019-12-10 08:28:41 +01:00
Vasily 4011674b0f Convert m_enableChaperoneHapticFeedback to new settings API 2019-12-10 08:28:41 +01:00
Vasily ee32cf90b5 Convert m_chaperoneSwitchToBeginnerActive to new settings API 2019-12-10 08:28:41 +01:00
Vasily 71b8a336c2 Convert m_alarmTime to new settings API 2019-12-10 08:28:41 +01:00
Vasily 09fcf79e8b Convert keyboardShortcuts to new settings API 2019-12-10 08:28:41 +01:00
Vasily 3375ee4b1a Convert m_vrcDebug to new settings API 2019-12-10 08:28:41 +01:00
Vasily a272decd73 Convert m_alarmIsModal to new settings API 2019-12-10 08:28:41 +01:00
Vasily e38c72ef42 Convert m_alarmEnabled to new settings API 2019-12-10 08:28:41 +01:00
Vasily a014de8368 Convert m_micReversePtt to new settings API 2019-12-10 08:28:41 +01:00
Vasily c96b531ee1 Convert m_micProximitySensorCanMute to new settings API
The `saveAudioSettings()` function lead to an infinite loop of
saving.
2019-12-10 08:28:41 +01:00
Vasily fd43c66878 Add micReversePtt to new settings API 2019-12-10 08:28:41 +01:00
Vasily 15d314024a Add m_micProximitySensorCanMute to new settings API 2019-12-10 08:28:41 +01:00
Vasily 2ab77e6584 Convert keyboardShortcut bindings to new settings API 2019-12-10 08:28:41 +01:00
Vasily 31982c54bf Add m_customTickRateMs to new settings API
The value is verified before saving and loading. It is the
responsibility of the function calling the settings API to verify data.
2019-12-10 08:28:41 +01:00
Vasily 87bf59fd31 Add m_debugState to new settings API 2019-12-10 08:28:41 +01:00
Vasily 598d77a0e7 Convert m_disableVersionCheck to new settings API 2019-12-10 08:28:41 +01:00
Vasily c8b271ad3e Add m_enableDebug to new settings API 2019-12-10 08:28:41 +01:00
Vasily bed0939ddf Add m_crashRecoveryDisabled to new settings API 2019-12-10 08:28:41 +01:00
Vasily adc3a1e7b2 Convert m_previousShutdownSafe to new settings API 2019-12-10 08:28:41 +01:00