Vasily
e71bc7b1b3
Add settings object API
...
Documentation is in `docs/specs/Settings-Object-API.md`.
2020-01-08 21:18:45 +01:00
Vasily
bda3cc0aa2
Update docs for building for Manjaro
2020-01-07 23:31:48 +01:00
Vasily
70d5675119
Update Linux build docs with required SteamVR libraries
...
https://github.com/ValveSoftware/openvr/issues/549#issuecomment-570911998
Program would not run without `libSDL2-2.0.so.0` and `libvulkan.so.1`
adding the below packages solved the issue on both 1804 and 1910.
2020-01-07 23:31:48 +01:00
Vasily
a21c42ef3d
Update Linux build docs for 1604 and 1804
2020-01-07 23:31:48 +01:00
Vasily
f315b8c182
Add qtchooser to Ubuntu 1904 TLDR
2020-01-07 23:31:48 +01:00
Vasily
7340a7468e
Update TOC in building for linux
2020-01-07 23:31:48 +01:00
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
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
Vasily
4ae8bd8fb5
Add m_vsyncDisabled to new settings API
2019-12-10 08:28:41 +01:00
Vasily
f945bd06bd
Remove unnecessary code forcing keyboardShortcuts to appear in config
...
The settings API automatically makes settings appear on startup.
2019-12-10 08:28:41 +01:00
Vasily
4be96344da
Convert m_flingStrength to new settings API
...
Casts inside the functions because it isn't feasible to change all
floats to double.
2019-12-10 08:28:41 +01:00
Vasily
4918ff2a37
Convert m_gravityStrength to new settings API
...
Casts inside the function because it's not feasible to change all floats
to double.
2019-12-10 08:28:41 +01:00
Vasily
58a92f4b2b
Convert m_heightToggleOffset to new settings API
...
Casts inside the function because it's not feasible at the moment to
change all floats to doubles.
2019-12-10 08:28:41 +01:00
Vasily
ed1190020c
Convert m_turnComfortFactor to new settings API
2019-12-10 08:28:41 +01:00
Vasily
214e1d26ed
Convert m_dragComfortFactor to new settings API and change sign
...
There was no reason for it to be unsigned. This has been changed to int
for internal consistency.
2019-12-10 08:28:41 +01:00
Vasily
7a6c3fc53e
Convert m_smoothTurnRate to new settings API
2019-12-10 08:28:41 +01:00
Vasily
22b52d403c
Convert m_snapTurnAngle to new settings API
2019-12-10 08:28:41 +01:00
Vasily
065c5da456
Convert m_simpleRecenter to new settings API
2019-12-10 08:28:41 +01:00
Vasily
bce378928d
Convert m_enableSeatedMotion to new settings API
2019-12-10 08:28:41 +01:00
Vasily
909b9aefec
Convert m_universeCenteredRotation to new settings API
2019-12-10 08:28:41 +01:00
Vasily
24e3081533
Convert m_oldStyleMotion to new settings API
2019-12-10 08:28:41 +01:00
Vasily
48209f6536
Convert m_allowExternalEdits to new settings API
2019-12-10 08:28:41 +01:00
Vasily
e757c722f7
Convert m_showLogMatricesButton to new settings API
2019-12-10 08:28:41 +01:00
Vasily
363a9f4990
Convert m_momentumSave to new settings API
2019-12-10 08:28:41 +01:00
Vasily
500fe0a98f
Convert m_turnBounds to new settings API
2019-12-10 08:28:41 +01:00
Vasily
2b7e33b51b
Prefer public getter over explicit settings call
...
The getter call is more resistant to change and leads to less code
duplication.
2019-12-10 08:28:41 +01:00
Vasily
5b23247667
Make DesktopOverlay use public getter instead of explicit settings call
...
Using the getter is clearer and leads to less code duplication.
2019-12-10 08:28:41 +01:00
Vasily
ba30e0054f
Convert m_dragBounds to new settings API
2019-12-10 08:28:41 +01:00
Vasily
89699825bf
Remove MoveCenterTabController::outputLogSettings
...
If settings changes are logged to console it should be handled in the
settings API.
2019-12-10 08:28:41 +01:00
Vasily
f91328298b
Convert m_settingsRightHandTurnEnabled to new settings API
2019-12-10 08:28:41 +01:00
Vasily
1061c39252
Convert m_settingsLeftHandTurnEnabled to new settings API
2019-12-10 08:28:41 +01:00
Vasily
c1b1756ccf
Convert m_settingsLeftHandDragEnabled to new settings API
2019-12-10 08:28:41 +01:00
Vasily
a81eb2cbf4
Convert m_settingsRightHandDragEnabled to new settings API
2019-12-10 08:28:41 +01:00
Vasily
289de29d69
Convert m_adjustChaperone to new settings API
2019-12-10 08:28:41 +01:00
Vasily
9755ffac64
Convert m_lockYToggle to new settings API
2019-12-10 08:28:41 +01:00
Vasily
d5b98f8452
Convert m_lockZToggle to new settings API
2019-12-10 08:28:41 +01:00
Vasily
866d48cc9e
Convert m_lockXToggle to new settings API
2019-12-10 08:28:41 +01:00
Vasily
92f1c59104
Convert DesktopOverlay to new settings API
2019-12-10 08:28:41 +01:00
Vasily
c8a0e41bfe
Remove features related to desktop overlay translation
...
The feature was killed by Valve and is not likely to come back.
2019-12-10 08:28:41 +01:00
Vasily
724bc51a15
Fix indentation in resources.pri
2019-12-10 08:28:41 +01:00
Vasily
6cf3b582f6
Fix QVariant not recognizing convertable types
...
The QMetaType did not correctly recognize that bools and doubles were
convertable from QVariant.
The new method is more robust.
2019-12-03 08:26:10 +01:00
Vasily
4eb8a35d6b
Add remaining int settings from initStage1 to new API
...
The settings API does not deal with unsigned ints, it is the
responsibility of the calling function to ensure that values are savable
as signed ints.
2019-12-03 08:26:10 +01:00
Vasily
3c3590539d
Add remaining double/bool settings in initStage1
2019-12-03 08:26:10 +01:00
Vasily
c2796273e7
Add adjustChaperone setting to BoolSetting
...
Meant to act as an example of how to add new settings.
2019-12-03 08:26:10 +01:00
Vasily
d73fcf3443
Change MoveCenterTabController::initStage1 from QSettings to new API
...
Only the existing changes were moved.
The remaining were not initially added because they didn't show up in
the .ini files I based my initial prototypes on.
2019-12-03 08:26:10 +01:00
Vasily
ca489200be
Remove unnecessary settings file path logging call in DesktopOverlay
2019-12-03 08:26:10 +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
61fd3dde79
Change m_window function call from -> to .
2019-11-30 18:14:49 +01:00
Vasily
2578f3b32e
Update version string to 4.0.1-dev from 4.0.1-release
...
String was mistakenly not changed back after release bins were built.
2019-11-30 18:14:49 +01:00
Vasily
6e04c77be2
Change name of m_pWindow in Linux only section
...
Name was not changed by tooling due to being in a Linux ifdef.
2019-11-30 18:14:49 +01:00
Vasily
8300f5395e
Convert m_pPumpEventsTimer into object
...
Having an extra layer of indirection was unnecessary.
The if statement guard to check if the pointer is null is now
unnecessary.
2019-11-30 18:14:49 +01:00
Vasily
96e80ec3ce
Convert m_pOffscreenSurface from pointer to object
2019-11-30 18:14:49 +01:00
Vasily
8136569455
Convert m_pOpenGLContext from pointer to object
2019-11-30 18:14:49 +01:00
Vasily
6c04dd25b1
Convert m_pWindow from pointer to object
...
The extra layer of indirection was unnecessary and had no benefit.
2019-11-30 18:14:49 +01:00
Vasily
2b9b3d653a
Convert m_pRenderControl from smart pointer to object
...
Having it be a pointer was an unnecessary complication with no gain.
2019-11-30 18:14:49 +01:00