├── .appveyor.yml ├── .clang-format ├── .gitignore ├── .travis.yml ├── LICENSE ├── Readme.md ├── advancedSettings.pro ├── build_scripts ├── linux │ ├── format │ └── verify_formatting ├── run-clang-format.py └── win │ ├── build.cmd │ ├── deploy.cmd │ ├── format.cmd │ ├── package.cmd │ └── verify_formatting.cmd ├── build_windows.cmd ├── docs ├── CONTRIBUTING.md ├── building_for_windows.md └── screenshots │ ├── AccessibilityPage.png │ ├── AudioPage.png │ ├── ChaperonePage.png │ ├── ChaperoneWarningPage.png │ ├── FloorFixPage.png │ ├── InVRScreenshot.png │ ├── PlayspacePage.png │ ├── RevivePage.png │ ├── RootPage.png │ ├── SettingsPage.png │ ├── StatisticsPage.png │ ├── SteamVRPage.png │ └── UtilitiesPage.png ├── installer ├── installer.nsi ├── listUninstallFiles.sh └── uninstallFiles.list ├── src ├── LICENSE.txt ├── main.cpp ├── manifest.vrmanifest ├── overlaycontroller.cpp ├── overlaycontroller.h ├── qt.conf ├── res │ ├── battery_0.png │ ├── battery_1.png │ ├── battery_2.png │ ├── battery_3.png │ ├── battery_4.png │ ├── battery_5.png │ ├── qml │ │ ├── AccessibilityPage.qml │ │ ├── AudioPage.qml │ │ ├── ChaperonePage.qml │ │ ├── ChaperoneWarningsPage.qml │ │ ├── FixFloorPage.qml │ │ ├── MyComboBox.qml │ │ ├── MyDialogOkCancelPopup.qml │ │ ├── MyDialogOkPopup.qml │ │ ├── MyPushButton.qml │ │ ├── MyPushButton2.qml │ │ ├── MyResources.qml │ │ ├── MySlider.qml │ │ ├── MyStackViewPage.qml │ │ ├── MyText.qml │ │ ├── MyTextField.qml │ │ ├── MyToggleButton.qml │ │ ├── PlayspacePage.qml │ │ ├── PttControllerConfigDialog.qml │ │ ├── RevivePage.qml │ │ ├── RootPage.qml │ │ ├── SettingsPage.qml │ │ ├── StatisticsPage.qml │ │ ├── SteamVRPage.qml │ │ ├── UtilitiesPage.qml │ │ ├── backarrow.svg │ │ ├── check.svg │ │ ├── mainwidget.qml │ │ ├── mic_off.svg │ │ ├── mic_on.svg │ │ ├── ptt_notification.png │ │ ├── ptt_notification.svg │ │ ├── qmldir │ │ ├── speaker_off.svg │ │ └── speaker_on.svg │ ├── sounds │ │ └── alarm01.wav │ └── thumbicon.png ├── restartvrserver.bat ├── startdesktopmode.bat ├── tabcontrollers │ ├── AccessibilityTabController.cpp │ ├── AccessibilityTabController.h │ ├── AudioManager.h │ ├── AudioTabController.cpp │ ├── AudioTabController.h │ ├── ChaperoneTabController.cpp │ ├── ChaperoneTabController.h │ ├── FixFloorTabController.cpp │ ├── FixFloorTabController.h │ ├── KeyboardInput.h │ ├── MoveCenterTabController.cpp │ ├── MoveCenterTabController.h │ ├── PttController.cpp │ ├── PttController.h │ ├── ReviveTabController.cpp │ ├── ReviveTabController.h │ ├── SettingsTabController.cpp │ ├── SettingsTabController.h │ ├── StatisticsTabController.cpp │ ├── StatisticsTabController.h │ ├── SteamVRTabController.cpp │ ├── SteamVRTabController.h │ ├── UtilitiesTabController.cpp │ ├── UtilitiesTabController.h │ ├── audiomanager │ │ ├── AudioManagerDummy.cpp │ │ ├── AudioManagerDummy.h │ │ ├── AudioManagerWindows.cpp │ │ ├── AudioManagerWindows.h │ │ └── IPolicyConfig.h │ └── keyboardinput │ │ ├── KeyboardInputDummy.cpp │ │ ├── KeyboardInputDummy.h │ │ ├── KeyboardInputWindows.cpp │ │ └── KeyboardInputWindows.h └── utils │ ├── ChaperoneUtils.cpp │ ├── ChaperoneUtils.h │ └── Matrix.h └── third-party ├── easylogging++ ├── LICENSE ├── easylogging++.cc └── easylogging++.h └── openvr ├── LICENSE ├── README.md ├── bin ├── linux32 │ ├── libopenvr_api.so │ └── libopenvr_api.so.dbg ├── linux64 │ ├── libopenvr_api.so │ └── libopenvr_api.so.dbg ├── osx32 │ ├── libopenvr_api.dylib │ └── libopenvr_api.dylib.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── libopenvr_api.dylib ├── osx64 │ └── OpenVR.framework │ │ ├── Headers │ │ ├── OpenVR │ │ ├── Resources │ │ └── Versions │ │ ├── A │ │ ├── Headers │ │ │ ├── openvr.h │ │ │ ├── openvr_api.cs │ │ │ ├── openvr_api.json │ │ │ ├── openvr_capi.h │ │ │ └── openvr_driver.h │ │ ├── OpenVR │ │ └── Resources │ │ │ └── Info.plist │ │ └── Current ├── win32 │ ├── openvr_api.dll │ └── openvr_api.pdb └── win64 │ ├── openvr_api.dll │ └── openvr_api.pdb ├── headers ├── openvr.h ├── openvr_api.cs ├── openvr_api.json ├── openvr_capi.h └── openvr_driver.h └── lib ├── linux32 └── libopenvr_api.so ├── linux64 └── libopenvr_api.so ├── osx32 └── libopenvr_api.dylib ├── win32 └── openvr_api.lib └── win64 └── openvr_api.lib /.appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2017 2 | 3 | environment: 4 | matrix: 5 | - QT_LOC: '"C:\Qt\5.11.2\msvc2017_64\bin\"' 6 | VS_LOC: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat"' 7 | JOM_LOC: '"C:\Qt\Tools\QtCreator\bin\jom.exe"' 8 | NSIS_LOC: '"C:\Program Files (x86)\NSIS\"' 9 | ZIP_LOC: 7z 10 | CLANG_FORMAT_LOC: '"C:\Program Files\LLVM\bin\clang-format.exe"' 11 | COMPILER: msvc 12 | VSVER: 14 13 | 14 | 15 | clone_depth: 1 16 | 17 | init: 18 | - set TAG_NAME=%APPVEYOR_REPO_TAG_NAME% 19 | 20 | build_script: 21 | - python ./build_scripts/run-clang-format.py ./src -r --clang-format-executable %CLANG_FORMAT_LOC% --color always 22 | - call "build_windows.cmd" 23 | 24 | artifacts: 25 | - path: bin\win64\AdvancedSettings.zip 26 | name: portable 27 | - path: installer\AdvancedSettings-Installer.exe 28 | name: installer 29 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | AccessModifierOffset: -4 4 | AlignAfterOpenBracket: Align 5 | AlignConsecutiveAssignments: false 6 | AlignConsecutiveDeclarations: false 7 | AlignEscapedNewlines: Right 8 | AlignOperands: true 9 | AlignTrailingComments: false 10 | AllowAllParametersOfDeclarationOnNextLine: false 11 | AllowShortBlocksOnASingleLine: false 12 | AllowShortCaseLabelsOnASingleLine: false 13 | AllowShortFunctionsOnASingleLine: Empty 14 | AllowShortIfStatementsOnASingleLine: false 15 | AllowShortLoopsOnASingleLine: false 16 | AlwaysBreakAfterDefinitionReturnType: None 17 | AlwaysBreakAfterReturnType: None 18 | AlwaysBreakBeforeMultilineStrings: false 19 | AlwaysBreakTemplateDeclarations: false 20 | BinPackArguments: false 21 | BinPackParameters: false 22 | BraceWrapping: 23 | AfterClass: true 24 | AfterControlStatement: true 25 | AfterEnum: true 26 | AfterFunction: true 27 | AfterNamespace: false 28 | AfterObjCDeclaration: false 29 | AfterStruct: true 30 | AfterUnion: true 31 | AfterExternBlock: true 32 | BeforeCatch: true 33 | BeforeElse: true 34 | IndentBraces: false 35 | SplitEmptyFunction: true 36 | SplitEmptyRecord: true 37 | SplitEmptyNamespace: true 38 | BreakBeforeBinaryOperators: All 39 | BreakBeforeBraces: Allman 40 | BreakBeforeInheritanceComma: false 41 | BreakBeforeTernaryOperators: true 42 | BreakConstructorInitializersBeforeComma: false 43 | BreakConstructorInitializers: BeforeColon 44 | BreakAfterJavaFieldAnnotations: false 45 | BreakStringLiterals: true 46 | ColumnLimit: 80 47 | CommentPragmas: '^ IWYU pragma:' 48 | CompactNamespaces: false 49 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 50 | ConstructorInitializerIndentWidth: 4 51 | ContinuationIndentWidth: 4 52 | Cpp11BracedListStyle: false 53 | DerivePointerAlignment: false 54 | DisableFormat: false 55 | ExperimentalAutoDetectBinPacking: false 56 | FixNamespaceComments: true 57 | ForEachMacros: 58 | - foreach 59 | - Q_FOREACH 60 | - BOOST_FOREACH 61 | IncludeBlocks: Preserve 62 | IncludeCategories: 63 | - Regex: '^"(llvm|llvm-c|clang|clang-c)/' 64 | Priority: 1 65 | - Regex: '^(<|"(gtest|gmock|isl|json)/)' 66 | Priority: 3 67 | - Regex: '.*' 68 | Priority: 2 69 | IncludeIsMainRegex: '(Test)?$' 70 | IndentCaseLabels: false 71 | IndentPPDirectives: AfterHash 72 | IndentWidth: 4 73 | IndentWrappedFunctionNames: true 74 | KeepEmptyLinesAtTheStartOfBlocks: false 75 | MacroBlockBegin: '' 76 | MacroBlockEnd: '' 77 | MaxEmptyLinesToKeep: 1 78 | NamespaceIndentation: Inner 79 | PenaltyBreakAssignment: 2 80 | PenaltyBreakBeforeFirstCallParameter: 19 81 | PenaltyBreakComment: 300 82 | PenaltyBreakFirstLessLess: 120 83 | PenaltyBreakString: 1000 84 | PenaltyExcessCharacter: 1000000 85 | PenaltyReturnTypeOnItsOwnLine: 60 86 | PointerAlignment: Left 87 | ReflowComments: true 88 | SortIncludes: false 89 | SortUsingDeclarations: true 90 | SpaceAfterCStyleCast: true 91 | SpaceAfterTemplateKeyword: true 92 | SpaceBeforeAssignmentOperators: true 93 | SpaceBeforeParens: ControlStatements 94 | SpaceInEmptyParentheses: false 95 | SpacesBeforeTrailingComments: 1 96 | SpacesInAngles: false 97 | SpacesInContainerLiterals: true 98 | SpacesInCStyleCastParentheses: true 99 | SpacesInParentheses: true 100 | SpacesInSquareBrackets: false 101 | Standard: Cpp11 102 | TabWidth: 4 103 | UseTab: Never 104 | ... 105 | 106 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | debug 2 | release 3 | assets 4 | bin 5 | Makefile* 6 | *.vcxproj* 7 | *.log 8 | *.vs 9 | *.stash 10 | *.appxmanifest 11 | *.user 12 | installer/AdvancedSettings-Installer.exe 13 | *.user* 14 | 15 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | dist: xenial 3 | compiler: 4 | - clang 5 | - gcc 6 | 7 | install: 8 | - sudo add-apt-repository ppa:kubuntu-ppa/backports -y 9 | - sudo apt-get update -qq 10 | - sudo apt-get install build-essential qtbase5-dev qttools5-dev qtdeclarative5-dev qtmultimedia5-dev qt5-default qttools5-dev-tools 11 | 12 | script: 13 | - python ./build_scripts/run-clang-format.py ./src -r --color always 14 | - mkdir build && cd build 15 | - qmake .. 16 | - make 17 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Archived 2 | 3 | ### Please Use this repo [https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings](https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings) 4 | -------------------------------------------------------------------------------- /advancedSettings.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2015-06-10T16:57:45 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui qml quick multimedia widgets 8 | CONFIG += c++14 9 | 10 | DEFINES += ELPP_THREAD_SAFE ELPP_QT_LOGGING ELPP_NO_DEFAULT_LOG_FILE 11 | 12 | lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.6 or higher") 13 | lessThan(QT_MINOR_VERSION, 6): error("requires Qt 5.6 or higher") 14 | 15 | TARGET = AdvancedSettings 16 | TEMPLATE = app 17 | 18 | *msvc* { 19 | #Removing -W3 from both FLAGS is necessary, otherwise compiler will give 20 | #D9025: overriding '/W4' with '/W3' 21 | QMAKE_CFLAGS_WARN_ON -= -W3 22 | QMAKE_CXXFLAGS_WARN_ON -= -W3 23 | #C4127 was in a third party file with no way to turn off. 24 | QMAKE_CXXFLAGS += /W4 /wd4127 25 | QMAKE_CXXFLAGS += /WX 26 | 27 | } 28 | 29 | *g++* { 30 | QMAKE_CXXFLAGS += -Werror 31 | } 32 | 33 | #Look for anything clang that is not clang-msvc, since it does not 34 | #allow all the same switches as regular clang. 35 | *clang|*clang-g++|*clang-libc++ { 36 | QMAKE_CXXFLAGS += -Werror 37 | #All includes from the third-party directory will not warn. 38 | QMAKE_CXXFLAGS += --system-header-prefix=third-party 39 | } 40 | SOURCES += src/main.cpp\ 41 | src/overlaycontroller.cpp \ 42 | src/tabcontrollers/AudioTabController.cpp \ 43 | src/tabcontrollers/ChaperoneTabController.cpp \ 44 | src/tabcontrollers/FixFloorTabController.cpp \ 45 | src/tabcontrollers/MoveCenterTabController.cpp \ 46 | src/tabcontrollers/SettingsTabController.cpp \ 47 | src/tabcontrollers/StatisticsTabController.cpp \ 48 | src/tabcontrollers/SteamVRTabController.cpp \ 49 | src/tabcontrollers/ReviveTabController.cpp \ 50 | src/tabcontrollers/UtilitiesTabController.cpp \ 51 | src/tabcontrollers/PttController.cpp \ 52 | src/tabcontrollers/AccessibilityTabController.cpp \ 53 | src/utils/ChaperoneUtils.cpp \ 54 | src/tabcontrollers/audiomanager/AudioManagerDummy.cpp \ 55 | src/tabcontrollers/keyboardinput/KeyboardInputDummy.cpp 56 | 57 | HEADERS += src/overlaycontroller.h \ 58 | src/tabcontrollers/AudioTabController.h \ 59 | src/tabcontrollers/ChaperoneTabController.h \ 60 | src/tabcontrollers/FixFloorTabController.h \ 61 | src/tabcontrollers/MoveCenterTabController.h \ 62 | src/tabcontrollers/SettingsTabController.h \ 63 | src/tabcontrollers/StatisticsTabController.h \ 64 | src/tabcontrollers/SteamVRTabController.h \ 65 | src/tabcontrollers/ReviveTabController.h \ 66 | src/tabcontrollers/UtilitiesTabController.h \ 67 | src/tabcontrollers/AudioManager.h \ 68 | src/tabcontrollers/PttController.h \ 69 | src/tabcontrollers/AccessibilityTabController.h \ 70 | src/tabcontrollers/KeyboardInput.h \ 71 | src/utils/Matrix.h \ 72 | src/utils/ChaperoneUtils.h \ 73 | src/tabcontrollers/audiomanager/AudioManagerDummy.h \ 74 | src/tabcontrollers/keyboardinput/KeyboardInputDummy.h 75 | 76 | win32 { 77 | SOURCES += src/tabcontrollers/audiomanager/AudioManagerWindows.cpp \ 78 | src/tabcontrollers/keyboardinput/KeyboardInputWindows.cpp 79 | HEADERS += src/tabcontrollers/audiomanager/AudioManagerWindows.h \ 80 | src/tabcontrollers/audiomanager/IPolicyConfig.h \ 81 | src/tabcontrollers/keyboardinput/KeyboardInputWindows.h 82 | } 83 | 84 | INCLUDEPATH += third-party/openvr/headers \ 85 | third-party/easylogging++ 86 | #easylogging++ used to be a header only lib. Now requires easylogging++.cc 87 | SOURCES += third-party/easylogging++/easylogging++.cc 88 | win32:LIBS += -L"$$PWD/third-party/openvr/lib/win64" -luser32 -lole32 89 | unix:LIBS += -L"$$PWD/third-party/openvr/lib/linux64" 90 | LIBS += -lopenvr_api 91 | 92 | win32:DESTDIR = bin/win64/AdvancedSettings 93 | unix:DESTDIR = bin/linux/AdvancedSettings 94 | 95 | DISTFILES += \ 96 | src/res/sounds/alarm01.wav \ 97 | src/res/qml/ptt_notification.png \ 98 | src/res/battery_0.png \ 99 | src/res/battery_1.png \ 100 | src/res/battery_2.png \ 101 | src/res/battery_3.png \ 102 | src/res/battery_4.png \ 103 | src/res/battery_5.png \ 104 | src/res/thumbicon.png \ 105 | src/res/qml/backarrow.svg \ 106 | src/res/qml/check.svg \ 107 | src/res/qml/mic_off.svg \ 108 | src/res/qml/mic_on.svg \ 109 | src/res/qml/ptt_notification.svg \ 110 | src/res/qml/speaker_off.svg \ 111 | src/res/qml/speaker_on.svg \ 112 | src/res/qml/qmldir \ 113 | src/res/qml/AccessibilityPage.qml \ 114 | src/res/qml/AudioPage.qml \ 115 | src/res/qml/ChaperonePage.qml \ 116 | src/res/qml/ChaperoneWarningsPage.qml \ 117 | src/res/qml/FixFloorPage.qml \ 118 | src/res/qml/mainwidget.qml \ 119 | src/res/qml/MyComboBox.qml \ 120 | src/res/qml/MyDialogOkCancelPopup.qml \ 121 | src/res/qml/MyDialogOkPopup.qml \ 122 | src/res/qml/MyPushButton.qml \ 123 | src/res/qml/MyPushButton2.qml \ 124 | src/res/qml/MyResources.qml \ 125 | src/res/qml/MySlider.qml \ 126 | src/res/qml/MyStackViewPage.qml \ 127 | src/res/qml/MyText.qml \ 128 | src/res/qml/MyTextField.qml \ 129 | src/res/qml/MyToggleButton.qml \ 130 | src/res/qml/PlayspacePage.qml \ 131 | src/res/qml/PttControllerConfigDialog.qml \ 132 | src/res/qml/RevivePage.qml \ 133 | src/res/qml/RootPage.qml \ 134 | src/res/qml/SettingsPage.qml \ 135 | src/res/qml/StatisticsPage.qml \ 136 | src/res/qml/SteamVRPage.qml \ 137 | src/res/qml/UtilitiesPage.qml 138 | -------------------------------------------------------------------------------- /build_scripts/linux/format: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | clang-format --version 4 | 5 | if [ $? -eq 0 ]; then 6 | echo "Clang-format found." 7 | build_path="`dirname \"$0\"`" 8 | project_path=$build_path/../.. 9 | 10 | find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 1: {}" \; 11 | find $project_path/src/ -regex '.*\.\(cpp\|h\)' -exec clang-format -style=file -i {} \; -exec echo "Iteration 2: {}" \; 12 | echo "DONE" 13 | else 14 | echo "Could not find clang-format." 15 | fi 16 | 17 | -------------------------------------------------------------------------------- /build_scripts/linux/verify_formatting: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | clang-format --version; 4 | 5 | if [ $? -eq 0 ]; then 6 | echo "Clang-format found." 7 | build_path="`dirname \"$0\"`" 8 | project_path=$build_path/../.. 9 | 10 | python $project_path/build_scripts/run-clang-format.py $project_path/src -r --color always; 11 | if [ $? -eq 0 ]; then 12 | echo "FORMATTED CORRECTLY." 13 | else 14 | echo "NOT FORMATTED CORRECTLY." 15 | fi 16 | else 17 | echo "Could not find clang-format." 18 | fi 19 | 20 | -------------------------------------------------------------------------------- /build_scripts/win/build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Echo off to avoid spam. 3 | 4 | REM Non zero is failure, 0 is success. 5 | SET exit_code_success=0 6 | SET exit_code_failure_build_apps=1 7 | SET exit_code_failure_build_locations=2 8 | 9 | REM Used for echos. 10 | SET current_activity=BUILD 11 | 12 | REM If scripts are chain called the original dirs should not be overwritten. 13 | IF NOT DEFINED original_dir ( 14 | SET original_dir=%CD% 15 | ) 16 | IF NOT DEFINED project_dir ( 17 | REM Arg 0 (called %0) is the full path to the file. 18 | REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters 19 | REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only. 20 | REM Project dir is up two dirs from the file. 21 | SET project_dir=%~dp0\..\..\ 22 | ) 23 | 24 | REM Change dir to the project dir, otherwise qmake doesn't know where it is. 25 | CD %project_dir% 26 | 27 | REM QT_LOC is a directory, it can't be in the path, no reason to check using WHERE. 28 | ECHO %current_activity%: Testing if all required build environment values are set: 29 | IF NOT DEFINED QT_LOC ( 30 | ECHO %current_activity%: QT_LOC not defined. Using default value. 31 | SET QT_LOC="C:\Qt\5.11.1\msvc2017_64\bin\" 32 | ) 33 | ECHO %current_activity%: QT_LOC set to '%QT_LOC%'. 34 | IF EXIST %QT_LOC% ( 35 | ECHO %current_activity%: QT_LOC exists. 36 | ) ELSE ( 37 | ECHO %current_activity%: QT_LOC directory does not exist. Exiting. 38 | EXIT /B %exit_code_failure_build_locations% 39 | ) 40 | 41 | IF NOT DEFINED VS_LOC ( 42 | ECHO %current_activity%: VS_LOC not defined. Using default value. 43 | SET VS_LOC="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" 44 | ) 45 | ECHO %current_activity%: VS_LOC set to '%VS_LOC%'. 46 | 47 | REM EXIST won't find items in the PATH. WHERE will. 48 | SET VS_VALID=0 49 | IF EXIST %VS_LOC% SET VS_VALID=1 50 | REM Prevents error message spam if it doesn't find it in PATH. 51 | IF NOT %VS_VALID% EQU 1 ( 52 | WHERE /Q %VS_LOC% 53 | IF NOT ERRORLEVEL 1 SET VS_VALID=1 54 | ) 55 | 56 | IF %VS_VALID% EQU 1 ( 57 | ECHO %current_activity%: VS_LOC exists. 58 | ) ELSE ( 59 | ECHO %current_activity%: VS_LOC directory does not exist. Exiting. 60 | EXIT /B %exit_code_failure_build_locations% 61 | ) 62 | 63 | ECHO %current_activity%: All required build environment values are set. 64 | 65 | IF DEFINED BUILD_DEBUG ( 66 | ECHO %current_activity%: BUILD_DEBUG var set. Compiling for debug. 67 | SET compile_level=debug 68 | ) ELSE ( 69 | ECHO %current_activity%: BUILD_DEBUG var not set. Compiling for release. 70 | SET compile_level=release 71 | ) 72 | 73 | ECHO %current_activity%: Setting up environment with Visual Studio 'vcvarsall.bat'. 74 | REM Currently only this platform is supported. 75 | SET target_platform=AMD64 76 | REM Set up environment for qmake. 77 | CALL %VS_LOC% %target_platform% 78 | 79 | IF DEFINED BUILD_VSPROJ ( 80 | ECHO %current_activity%: BUILD_VSPROJ defined. Building Visual Studio project files. 81 | %QT_LOC%\qmake -tp vc 82 | ECHO %current_activity%: Building Visual Studio project files done. 83 | ) ELSE ( 84 | ECHO %current_activity%: BUILD_VSPROJ not defined. Not building Visual Studio project files. 85 | ) 86 | 87 | ECHO %current_activity%: Running qmake for %compile_level%: 88 | %QT_LOC%\qmake -spec win32-msvc CONFIG+=x86_64 CONFIG+=%compile_level% 89 | ECHO %current_activity%: qmake done. 90 | 91 | IF NOT DEFINED JOM_LOC ( 92 | ECHO %current_activity%: JOM_LOC not defined. Using default value. 93 | SET JOM_LOC="C:\Qt\Tools\QtCreator\bin\jom.exe" 94 | ) 95 | ECHO %current_activity%: JOM_LOC set to '%JOM_LOC%'. 96 | 97 | IF EXIST %JOM_LOC% ( 98 | ECHO %current_activity%: JOM_LOC exists. 99 | ECHO %current_activity%: Running jom: 100 | %JOM_LOC% 101 | REM jom will not exit with an error code. Leading to a passing build even with errors. 102 | IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% 103 | ECHO %current_activity%: jom done. 104 | ) ELSE ( 105 | ECHO JOM_LOC directory does not exist. Using nmake. 106 | ECHO %current_activity%: Running nmake: 107 | nmake 108 | REM nmake will not exit with an error code. Leading to a passing build even with errors. 109 | IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% 110 | ECHO %current_activity%: nmake done. 111 | ) 112 | 113 | CD %original_dir% 114 | 115 | ECHO %current_activity%: %current_activity% DONE. -------------------------------------------------------------------------------- /build_scripts/win/deploy.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Echo off to avoid spam. 3 | 4 | REM Non zero is failure, 0 is success. 5 | SET exit_code_success=0 6 | SET exit_code_failure_build_apps=1 7 | SET exit_code_failure_build_locations=2 8 | 9 | SET output_dir="\bin\win64\" 10 | 11 | REM Used for echos. 12 | SET current_activity=DEPLOY 13 | 14 | REM If scripts are chain called the original dirs should not be overwritten. 15 | IF NOT DEFINED original_dir ( 16 | SET original_dir=%CD% 17 | ) 18 | IF NOT DEFINED project_dir ( 19 | REM Arg 0 (called %0) is the full path to the file. 20 | REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters 21 | REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only. 22 | REM Project dir is up two dirs from the file. 23 | SET project_dir=%~dp0\..\..\ 24 | ) 25 | 26 | ECHO %current_activity%: Testing if all required build environment values are set: 27 | IF NOT DEFINED QT_LOC ( 28 | ECHO %current_activity%: QT_LOC not defined. Using default value. 29 | SET QT_LOC="C:\Qt\5.11.1\msvc2017_64\bin\" 30 | ) 31 | REM QT_LOC is a directory, it can't be in the path, no reason to check using WHERE. 32 | ECHO %current_activity%: QT_LOC set to '%QT_LOC%'. 33 | IF EXIST %QT_LOC% ( 34 | ECHO %current_activity%: QT_LOC exists. 35 | ) ELSE ( 36 | ECHO %current_activity%: QT_LOC directory does not exist. Exiting. 37 | EXIT /B %exit_code_failure_build_locations% 38 | ) 39 | 40 | ECHO %current_activity%: All required build environment values are set. 41 | 42 | IF NOT EXIST %project_dir%\%output_dir% ( 43 | ECHO %current_activity%: Output dir '%output_dir%' does not exist. Creating. 44 | mkdir %project_dir%\%output_dir% 45 | ECHO %current_activity%: Output dir created. 46 | ) 47 | 48 | cd %project_dir%\%output_dir% 49 | 50 | IF DEFINED BUILD_DEBUG ( 51 | ECHO %current_activity%: BUILD_DEBUG var set. Compiling for debug. 52 | SET compile_level=debug 53 | ) ELSE ( 54 | ECHO %current_activity%: BUILD_DEBUG var not set. Compiling for release. 55 | SET compile_level=release 56 | ) 57 | 58 | ECHO %current_activity%: Running windeployqt: 59 | 60 | REM windeployqt requires the QT\bin location to be in the path. 61 | REM Changing the PATH var is not ideal, but windeployqt does not work otherwise. 62 | set original_path=%PATH% 63 | set PATH=%QT_LOC%;%PATH% 64 | 65 | REM Caret newline (^CFLR) splits a command over several lines. 66 | REM This is done to avoid one ultra long line. 67 | 68 | windeployqt --dir AdvancedSettings\qtdata ^ 69 | --libdir AdvancedSettings ^ 70 | --plugindir AdvancedSettings\qtdata\plugins ^ 71 | --no-system-d3d-compiler ^ 72 | --no-opengl-sw ^ 73 | --%compile_level% ^ 74 | --qmldir ..\..\src\res\qml\ ^ 75 | AdvancedSettings\AdvancedSettings.exe 76 | 77 | REM windeployqt does not exit on error by itself. 78 | IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% 79 | REM Return the PATH to original as quickly as possible. 80 | set PATH=%original_path% 81 | ECHO %current_activity%: windeployqt done. 82 | 83 | REM Switches used for copy: 84 | REM /V Verifies that files have been copied correctly. 85 | REM /Q Suppresses xcopy spam. 86 | REM /Y Skips the overwrite yes prompt. 87 | REM /E Copies all subdirs, even if they are empty. 88 | REM /I "If Source is a directory or contains wildcards and Destination does not exist, 89 | REM xcopy assumes Destination specifies a directory name and creates a new directory. 90 | REM Then, xcopy copies all specified files into the new directory. By default, 91 | REM xcopy prompts you to specify whether Destination is a file or a directory." 92 | 93 | ECHO %current_activity%: Copying necessary files. 94 | copy /V /Y "%project_dir%\Readme.md" "%project_dir%\%output_dir%\AdvancedSettings\Readme.md" 95 | ECHO %current_activity%: README copied. 96 | 97 | REM All three licenses must be included in binary releases, as per the terms. 98 | copy /V /Y "%project_dir%\LICENSE" "%project_dir%\%output_dir%\AdvancedSettings\LICENSE-GPL.txt" 99 | copy /V /Y "%project_dir%\third-party\openvr\LICENSE" "%project_dir%\%output_dir%\AdvancedSettings\LICENSE-VALVE.txt" 100 | copy /V /Y "%project_dir%\third-party\easylogging++\LICENSE" "%project_dir%\%output_dir%\AdvancedSettings\LICENSE-MIT.txt" 101 | ECHO %current_activity%: LICENSE files copied. 102 | 103 | xcopy /Q /Y /E /I /V "%project_dir%\src\res" "%project_dir%\%output_dir%\AdvancedSettings\res\" 104 | ECHO %current_activity%: Resource files copied. 105 | 106 | copy /V /Y "%project_dir%\src\restartvrserver.bat" "%project_dir%\%output_dir%\AdvancedSettings\restartvrserver.bat" 107 | copy /V /Y "%project_dir%\src\startdesktopmode.bat" "%project_dir%\%output_dir%\AdvancedSettings\startdesktopmode.bat" 108 | ECHO %current_activity%: Extra batch files copied. 109 | 110 | copy /V /Y "%project_dir%\src\qt.conf" "%project_dir%\%output_dir%\AdvancedSettings\qt.conf" 111 | copy /V /Y "%project_dir%\src\manifest.vrmanifest" "%project_dir%\%output_dir%\AdvancedSettings\manifest.vrmanifest" 112 | ECHO %current_activity%: VR specific configuration files copied. 113 | 114 | copy /V /Y "%project_dir%\third-party\openvr\bin\win64\openvr_api.dll" "%project_dir%\%output_dir%\AdvancedSettings\openvr_api.dll" 115 | ECHO %current_activity%: OpenVR .dll copied. 116 | 117 | cd %original_dir% 118 | 119 | ECHO %current_activity%: %current_activity% DONE. -------------------------------------------------------------------------------- /build_scripts/win/format.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Echo off to avoid spam. 3 | 4 | REM Non zero is failure, 0 is success. 5 | SET exit_code_success=0 6 | SET exit_code_failure_build_apps=1 7 | SET exit_code_failure_build_locations=2 8 | 9 | REM Used for echos. 10 | SET current_activity=FORMAT 11 | 12 | REM If scripts are chain called the original dirs should not be overwritten. 13 | IF NOT DEFINED original_dir ( 14 | SET original_dir=%CD% 15 | ) 16 | IF NOT DEFINED project_dir ( 17 | REM Arg 0 (called %0) is the full path to the file. 18 | REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters 19 | REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only. 20 | REM Project dir is up two dirs from the file. 21 | SET project_dir=%~dp0\..\..\ 22 | ) 23 | 24 | ECHO %current_activity%: Testing if clang-format can be located: 25 | 26 | IF NOT DEFINED CLANG_FORMAT_LOC ( 27 | ECHO %current_activity%: CLANG_FORMAT_LOC not defined. Using default value. 28 | SET CLANG_FORMAT_LOC="C:\Program Files\LLVM\bin\clang-format.exe" 29 | ) 30 | ECHO %current_activity%: CLANG_FORMAT_LOC set to '%CLANG_FORMAT_LOC%'. 31 | 32 | REM EXIST won't find items in the PATH. WHERE will. 33 | SET CLANG_FORMAT_VALID=0 34 | IF EXIST %CLANG_FORMAT_LOC% SET CLANG_FORMAT_VALID=1 35 | IF %CLANG_FORMAT_VALID% EQU 0 ( 36 | WHERE /Q %CLANG_FORMAT_LOC% 37 | IF NOT ERRORLEVEL 1 SET CLANG_FORMAT_VALID=1 38 | ) 39 | 40 | IF %CLANG_FORMAT_VALID% EQU 1 ( 41 | ECHO %current_activity%: CLANG_FORMAT_LOC exists. 42 | ) ELSE ( 43 | ECHO %current_activity%: CLANG_FORMAT_LOC directory does not exist. Exiting. 44 | EXIT /B %exit_code_failure_build_locations% 45 | ) 46 | 47 | ECHO %current_activity%: Clang-format located. 48 | 49 | %CLANG_FORMAT_LOC% --version 50 | 51 | REM First iteration. 52 | FOR /R %project_dir%\src\ %%F IN (*.cpp *.h) DO (%CLANG_FORMAT_LOC% --style=file -i %%F & ECHO Iteration 1. %%F) 53 | 54 | REM Clang-format is sometimes indecisive about which exact rules to apply, 55 | REM leading to differences between first and second iteration. 56 | REM Do it twice, just to be sure. 57 | 58 | FOR /R %project_dir%\src\ %%F IN (*.cpp *.h) DO (%CLANG_FORMAT_LOC% --style=file -i %%F & ECHO Iteration 2. %%F) 59 | 60 | ECHO %current_activity%: %current_activity% DONE. 61 | -------------------------------------------------------------------------------- /build_scripts/win/package.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Echo off to avoid spam. 3 | 4 | REM Non zero is failure, 0 is success. 5 | SET exit_code_success=0 6 | SET exit_code_failure_build_apps=1 7 | SET exit_code_failure_build_locations=2 8 | 9 | SET output_dir="\bin\win64\" 10 | 11 | REM Used for echos. 12 | SET current_activity=PACKAGE 13 | 14 | REM If scripts are chain called the original dirs should not be overwritten. 15 | IF NOT DEFINED original_dir ( 16 | SET original_dir=%CD% 17 | ) 18 | IF NOT DEFINED project_dir ( 19 | REM Arg 0 (called %0) is the full path to the file. 20 | REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters 21 | REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only. 22 | REM Project dir is up two dirs from the file. 23 | SET project_dir=%~dp0\..\..\ 24 | ) 25 | 26 | REM ZIP_LOC can't be called 7Z_LOC because of Windows limitations. 27 | ECHO %current_activity%: Testing if all required build environment values are set: 28 | 29 | IF NOT DEFINED ZIP_LOC ( 30 | ECHO %current_activity%: ZIP_LOC not defined. Using default value. 31 | SET ZIP_LOC="C:\Program Files\7-Zip\7z.exe" 32 | ) 33 | ECHO %current_activity%: ZIP_LOC set to '%ZIP_LOC%'. 34 | 35 | REM EXIST won't find items in the PATH. WHERE will. 36 | SET ZIP_VALID=0 37 | IF EXIST %ZIP_LOC% SET ZIP_VALID=1 38 | IF %ZIP_VALID% EQU 0 ( 39 | WHERE /Q %ZIP_LOC% 40 | IF NOT ERRORLEVEL 1 SET ZIP_VALID=1 41 | ) 42 | 43 | IF %ZIP_VALID% EQU 1 ( 44 | ECHO %current_activity%: ZIP_LOC exists. 45 | ) ELSE ( 46 | ECHO %current_activity%: ZIP_LOC directory does not exist. Exiting. 47 | EXIT /B %exit_code_failure_build_locations% 48 | ) 49 | 50 | IF NOT DEFINED NSIS_LOC ( 51 | ECHO %current_activity%: NSIS_LOC not defined. Using default value. 52 | SET NSIS_LOC="C:\Program Files (x86)\NSIS\" 53 | ) 54 | ECHO %current_activity%: NSIS_LOC set to '%NSIS_LOC%'. 55 | 56 | REM EXIST won't find items in the PATH. WHERE will. 57 | SET NSIS_VALID=0 58 | IF EXIST %NSIS_LOC% SET NSIS_VALID=1 59 | REM Prevents error message spam if it doesn't find it in PATH. 60 | IF %NSIS_VALID% EQU 0 ( 61 | WHERE /Q %NSIS_LOC% 62 | IF NOT ERRORLEVEL 1 SET NSIS_VALID=1 63 | ) 64 | 65 | IF %NSIS_VALID% EQU 1 ( 66 | ECHO %current_activity%: NSIS_LOC exists. 67 | ) ELSE ( 68 | ECHO %current_activity%: NSIS_LOC directory does not exist. Exiting. 69 | EXIT /B %exit_code_failure_build_locations% 70 | ) 71 | 72 | ECHO %current_activity%: All required build environment values are set. 73 | 74 | IF DEFINED BUILD_DEBUG ( 75 | ECHO %current_activity%: BUILD_DEBUG var set. NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS. 76 | ECHO %current_activity%: NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS. 77 | ECHO %current_activity%: NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS. 78 | ECHO %current_activity%: NOT PACKAGING TO AVOID SHIPPING DEBUG BUILDS. 79 | EXIT /B %exit_code_failure_build_apps% 80 | ) 81 | 82 | ECHO %current_activity%: Running 7zip: 83 | %ZIP_LOC% a %project_dir%\%output_dir%\AdvancedSettings.zip %project_dir%\%output_dir%\AdvancedSettings\* 84 | ECHO %current_activity%: 7zip done. 85 | 86 | ECHO %current_activity%: Running NSIS: 87 | REM Trying to launch makensis without CD into the dir does not work for some reason. 88 | CD %NSIS_LOC% 89 | REM /V2 is show warnings and errors, /WX is treat warnings as errors. 90 | makensis /V2 /WX %project_dir%\installer\installer.nsi 91 | IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% 92 | ECHO %current_activity%: NSIS done. 93 | 94 | CD %original_dir% 95 | 96 | ECHO %current_activity%: %current_activity% DONE. -------------------------------------------------------------------------------- /build_scripts/win/verify_formatting.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Arg 0 (called %0) is the full path to the file. 3 | REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters 4 | REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only. 5 | REM Project dir is up two dirs from the file. 6 | SET project_dir=%~dp0\..\..\ 7 | 8 | ECHO %current_activity%: Testing if clang-format can be located: 9 | 10 | IF NOT DEFINED CLANG_FORMAT_LOC ( 11 | ECHO %current_activity%: CLANG_FORMAT_LOC not defined. Using default value. 12 | SET CLANG_FORMAT_LOC="C:\Program Files\LLVM\bin\clang-format.exe" 13 | ) 14 | ECHO %current_activity%: CLANG_FORMAT_LOC set to '%CLANG_FORMAT_LOC%'. 15 | 16 | REM EXIST won't find items in the PATH. WHERE will. 17 | SET CLANG_FORMAT_VALID=0 18 | IF EXIST %CLANG_FORMAT_LOC% SET CLANG_FORMAT_VALID=1 19 | IF %CLANG_FORMAT_VALID% EQU 0 ( 20 | WHERE /Q %CLANG_FORMAT_LOC% 21 | IF NOT ERRORLEVEL 1 SET CLANG_FORMAT_VALID=1 22 | ) 23 | 24 | IF %CLANG_FORMAT_VALID% EQU 1 ( 25 | ECHO %current_activity%: CLANG_FORMAT_LOC exists. 26 | ) ELSE ( 27 | ECHO %current_activity%: CLANG_FORMAT_LOC directory does not exist. Exiting. 28 | EXIT /B %exit_code_failure_build_locations% 29 | ) 30 | 31 | ECHO %current_activity%: Clang-format located. 32 | 33 | %CLANG_FORMAT_LOC% --version 34 | 35 | python %project_dir%/build_scripts/run-clang-format.py %project_dir%/src -r --color never --clang-format-executable %CLANG_FORMAT_LOC% 36 | IF NOT ERRORLEVEL 1 ( 37 | ECHO FORMATTED CORRECTLY. 38 | ) ELSE ( 39 | ECHO NOT FORMATTED CORRECTLY. 40 | ) -------------------------------------------------------------------------------- /build_windows.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Echo off to avoid spam. 3 | 4 | REM Used for echos. 5 | SET top_level_activity=MASTER 6 | 7 | REM If scripts are chain called the original dirs should not be overwritten. 8 | 9 | SET original_dir=%CD% 10 | 11 | 12 | REM Arg 0 (called %0) is the full path to the file. 13 | REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters 14 | REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only. 15 | SET folder_path=%~dp0 16 | REM Project dir is up two dirs from the file. 17 | SET project_dir=%folder_path% 18 | 19 | 20 | ECHO %top_level_activity%: Calling build script. 21 | CALL %project_dir%\build_scripts\win\build.cmd 22 | IF ERRORLEVEL 1 EXIT /B 1 23 | 24 | ECHO %top_level_activity%: Calling deployment script. 25 | CALL %project_dir%\build_scripts\win\deploy.cmd 26 | IF ERRORLEVEL 1 EXIT /B 1 27 | 28 | ECHO %top_level_activity%: Calling packaging script. 29 | CALL %project_dir%\build_scripts\win\package.cmd 30 | IF ERRORLEVEL 1 EXIT /B 1 31 | 32 | CD %original_dir% 33 | 34 | ECHO %top_level_activity%: MASTER DONE. -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | # How to contribute to OpenVR Advanced Settings 3 | 4 | > * [You found a bug or have a suggestion for improvement](#bug_improvement) 5 | > * [You wrote a patch](#patch) 6 | > * [Building](#building) 7 | > * [Formatting](#formatting) 8 | > * [Style guide](#style) 9 | 10 | 11 | ## You found a bug or have a suggestion for improvement 12 | 13 | First, look through the [issues page](https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues) and see if there are any open issues relevant to yours. If there are, describe your issue in detail and why you think it's relevant to the already open issue. 14 | 15 | If there aren't any open issues relevant to yours, create a new issue and give as much detail as possible. 16 | 17 | For bug reports include what you expect to happen, what happened, version number of the application, operating system, SteamVR version number (if possible) and any other information you find relevant. 18 | 19 | For improvement requests include what you're expecting to do, why you want the feature this way, the problem that you're solving and any other information that you find relevant. 20 | 21 | Include logs if possible. Logs can be found in `%APPDATA%\matzman666\OpenVRAdvancedSettings\AdvancedSettings.log` on Windows. 22 | 23 | 24 | ## You want to submit changes 25 | 26 | 27 | ### Building 28 | 29 | If you haven't already, read the instructions for how to build on [Windows](https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/tree/master#building_on_windows) or [Linux](https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/tree/master#building_on_linux). Your patch must build on all platforms without errors (warnings are treated as errors). Notice that different compilers have different warning messages, being able to successfully compile on one does not mean that all of them will pass. The pull request will be built on both Windows (msvc) and Linux (gcc and clang) CI servers. 30 | 31 | 32 | ### Formatting 33 | 34 | This project uses `clang-format` (part of the [LLVM collection](https://releases.llvm.org/download.html)) on all `*.cpp`and `*.h` files in the `src` directory, using the supplied `.clang-format` file in the root of the repository. Correct formatting is checked by the CI servers. 35 | 36 | The `.\build_scripts\win\format.cmd` (for Windows) and `./build_scripts/linux/format` (for Linux) scripts will automatically run `clang-format` on all required files. 37 | 38 | The Windows script requires that either your `clang-format.exe` is in `C:\Program Files\LLVM\bin\clang-format.exe` or the `CLANG_FORMAT_LOC` environment variable is set to the location of the `.exe`. 39 | 40 | The Linux script requires that `clang-format` is in your `path`. 41 | 42 | There are `clang-format` plugins for many IDEs, including [Qt Creator](https://doc.qt.io/qtcreator/creator-beautifier.html) and [Visual Studio](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat). 43 | 44 | To verify that your patch has been formatted correctly, run `.\build_scripts\win\verify_formatting.cmd` on Windows or `./build_scripts/linux/verify_formatting` on Linux. If there are formatting changes needed the script will output a diff showing which changes are needed, otherwise it will output `FORMATTED CORRECTLY.`. The verification script requires `python` in the `path` for Linux and Windows. On Windows the verification script will either use the `CLANG_FORMAT_LOC` environment variable or the default location. 45 | 46 | 47 | ### Style guide 48 | 49 | Currently, there are no directives for style other than `clang-format`. -------------------------------------------------------------------------------- /docs/building_for_windows.md: -------------------------------------------------------------------------------- 1 | # Building for Windows 2 | 3 | 4 | > * [Requirements](#requirements) 5 | > * [Locations and Environment Variables](#locs_and_envs) 6 | > * [Building](#features) 7 | > * [Contributing](#contributing) 8 | > * [Using with QtCreator](#qt_creator) 9 | > * [Using with Visual Studio](#visual_studio) 10 | 11 | 12 | ## Requirements 13 | 14 | For compiling: 15 | 16 | 1. [Microsoft Visual Studio](https://visualstudio.microsoft.com/downloads/) (tested on 2017 Community) 17 | 2. [Qt Framework](https://www.qt.io/download) version later than 5.6 (tested on 5.10 and 5.11) 18 | 19 | For pushing changes to the repo: 20 | 21 | 1. [Python 3](https://www.python.org/downloads/) (must be in `PATH` environment variable) 22 | 23 | 2. Clang format. Part of the [LLVM collection](https://releases.llvm.org/download.html). 24 | 25 | Additionally, for fully building portable and installer release versions: 26 | 27 | 3. [7zip](https://www.7-zip.org/download.html) 28 | 29 | 4. [Nullsoft Scriptable Install System (NSIS)](https://sourceforge.net/projects/nsis/) 30 | 31 | 32 | 33 | ## Locations and Environment Variables 34 | 35 | The following environmental variables are relevant for building the project. 36 | 37 | | Environment Variable | Purpose | 38 | | -------------------- | ------------- | 39 | | `QT_LOC` | Path to your Qt `\bin\` folder. | 40 | | `VS_LOC` | Path to your Visual Studio `vcvarsall.bat` file. | 41 | | `JOM_LOC` | Path to an `.exe` of `jom.exe`. Usually installed with Qt. `jom` is a wrapper around `nmake` allowing more threads to be used. It is not required, but using `nmake`is slower. If `JOM_LOC` isn't defined, or the `.exe` can't be found `nmake` will be used by default. To force using `nmake`, set `JOM_LOC` to a non-valid path like `1`. | 42 | | `ZIP_LOC` | Path to your 7zip `.exe`. Both portable and installer will work. | 43 | | `NSIS_LOC` | Path to your installation of NSIS containing the `makensis` file. Both portable and installer will work. | 44 | | `CLANG_FORMAT_LOC` | Path to your `clang-format.exe`. Not necessary for building, but necessary for pushing changes to the repo. | 45 | 46 | If an environment variable isn't set a default value will be provided. The default values are shown in the table below. 47 | 48 | | Environment Variable | Default Value | 49 | | -------------------- | ------------- | 50 | | `QT_LOC` | `"C:\Qt\5.11.1\msvc2017_64\bin\"` | 51 | | `VS_LOC` | `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat"` | 52 | | `JOM_LOC` | `"C:\Qt\Tools\QtCreator\bin\jom.exe"`| 53 | | `ZIP_LOC` | `"C:\Program Files\7-Zip\7z.exe"` | 54 | | `NSIS_LOC` | `"C:\Program Files (x86)\NSIS\"` | 55 | | `CLANG_FORMAT_LOC` | `"C:\Program Files\LLVM\bin\clang-format.exe"` | 56 | 57 | Additionally, these optional environment variables are supported. 58 | 59 | | Environment Variable | Purpose | 60 | | -------------------- | ------------- | 61 | | `BUILD_DEBUG` | If set, a debug version will be built. The packaging script will not run with this var set. | 62 | | `BUILD_VSPROJ` | If set, Visual Studio project files will be built. | 63 | 64 | Remember that there's a difference between an unset variable and a variable set to an empty string. `SET BUILD_DEBUG=""` does not unset the variable. You need to write `SET BUILD_DEBUG=`. 65 | 66 | The `.dll` files necessary for a release build differ from those needed by a debug build. Therefore you need to make sure you run all scripts with `BUILD_DEBUG` either defined or undefined, depending on your needs. 67 | 68 | 69 | ## Building 70 | 71 | With the programs above installed and environment variables set, go into the root folder of the repository and run `build_windows.cmd`. Compiled binaries along with everything needed to run portable will output to `.\bin\win64\AdvancedSettings\`. 72 | 73 | 74 | ## Contributing 75 | 76 | For full details, see [CONTRIBUTING.md](CONTRIBUTING.md). 77 | 78 | 79 | ## Using with QtCreator 80 | 81 | Run `build_windows.cmd` once and fully build (packaging not necessary) the application. Open the `.pro` file in Qt Creator. A build and toolchain option should be marked in Qt Creator, with all others unmarked. If it isn't, set the directory to be the root repo directory. You should now be able to compile and run in Qt Creator without issues. 82 | 83 | Notice that you may need to redeploy library files if you make large changes (run `build_scripts\win\deploy.cmd`). 84 | 85 | Additionally, you can set Qt Creator to run `build_scripts\win\deploy.cmd` on compilation in order to ensure that the correct libraries are present. Remember to set or unset `BUILD_DEBUG` depending on your needs. 86 | 87 | 88 | ## Using with Visual Studio 89 | 90 | Run `build_windows.cmd` once and fully build (packaging not necessary) the application with the `BUILD_VSPROJ` environment variable set. Open the newly created project file. If you compiled a release build (`BUILD_DEBUG` not set) change the build type to release in Visual Studio. You should be able to compile and run with Visual Studio without issues. 91 | 92 | Notice that any new files you add or compiler settings you change will not be backported to the `.pro` file. Hence it is necessary to manually change the `.pro` file. 93 | 94 | Notice that you may need to redeploy library files if you make large changes (run `build_scripts\win\deploy.cmd`). 95 | 96 | Additionally, you can set Visual Studio to run `build_scripts\win\deploy.cmd` on compilation in order to ensure that the correct libraries are present. Remember to set or unset `BUILD_DEBUG` depending on your needs. -------------------------------------------------------------------------------- /docs/screenshots/AccessibilityPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/AccessibilityPage.png -------------------------------------------------------------------------------- /docs/screenshots/AudioPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/AudioPage.png -------------------------------------------------------------------------------- /docs/screenshots/ChaperonePage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/ChaperonePage.png -------------------------------------------------------------------------------- /docs/screenshots/ChaperoneWarningPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/ChaperoneWarningPage.png -------------------------------------------------------------------------------- /docs/screenshots/FloorFixPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/FloorFixPage.png -------------------------------------------------------------------------------- /docs/screenshots/InVRScreenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/InVRScreenshot.png -------------------------------------------------------------------------------- /docs/screenshots/PlayspacePage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/PlayspacePage.png -------------------------------------------------------------------------------- /docs/screenshots/RevivePage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/RevivePage.png -------------------------------------------------------------------------------- /docs/screenshots/RootPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/RootPage.png -------------------------------------------------------------------------------- /docs/screenshots/SettingsPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/SettingsPage.png -------------------------------------------------------------------------------- /docs/screenshots/StatisticsPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/StatisticsPage.png -------------------------------------------------------------------------------- /docs/screenshots/SteamVRPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/SteamVRPage.png -------------------------------------------------------------------------------- /docs/screenshots/UtilitiesPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/docs/screenshots/UtilitiesPage.png -------------------------------------------------------------------------------- /installer/installer.nsi: -------------------------------------------------------------------------------- 1 | ;-------------------------------- 2 | ;Include Modern UI 3 | 4 | !include "MUI2.nsh" 5 | 6 | ;-------------------------------- 7 | ;General 8 | 9 | !define BASEDIR "..\bin\win64\AdvancedSettings" 10 | !define SRCDIR "..\src" 11 | !define THIRDDIR "..\third-party" 12 | 13 | ;Name and file 14 | Name "OpenVR Advanced Settings" 15 | OutFile "AdvancedSettings-Installer.exe" 16 | 17 | ;Default installation folder 18 | InstallDir "$PROGRAMFILES64\OpenVR-AdvancedSettings" 19 | 20 | ;Get installation folder from registry if available 21 | InstallDirRegKey HKLM "Software\OpenVR-AdvancedSettings" "" 22 | 23 | ;Request application privileges for Windows Vista 24 | RequestExecutionLevel admin 25 | 26 | ;-------------------------------- 27 | ;Variables 28 | 29 | VAR upgradeInstallation 30 | 31 | ;-------------------------------- 32 | ;Interface Settings 33 | 34 | !define MUI_ABORTWARNING 35 | 36 | ;-------------------------------- 37 | ;Pages 38 | 39 | !insertmacro MUI_PAGE_LICENSE "..\LICENSE" 40 | !define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre 41 | !insertmacro MUI_PAGE_DIRECTORY 42 | !insertmacro MUI_PAGE_INSTFILES 43 | 44 | !insertmacro MUI_UNPAGE_CONFIRM 45 | !insertmacro MUI_UNPAGE_INSTFILES 46 | 47 | ;-------------------------------- 48 | ;Languages 49 | 50 | !insertmacro MUI_LANGUAGE "English" 51 | 52 | ;-------------------------------- 53 | ;Macros 54 | 55 | !macro TerminateOverlay 56 | DetailPrint "Terminating OpenVR Advanced Settings overlay..." 57 | ExecWait '"taskkill" /F /IM AdvancedSettings.exe' 58 | Sleep 2000 ; give 2 seconds for the application to finish exiting 59 | !macroend 60 | 61 | ;-------------------------------- 62 | ;Functions 63 | 64 | Function dirPre 65 | StrCmp $upgradeInstallation "true" 0 +2 66 | Abort 67 | FunctionEnd 68 | 69 | Function .onInit 70 | StrCpy $upgradeInstallation "false" 71 | 72 | ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVRAdvancedSettings" "UninstallString" 73 | StrCmp $R0 "" done 74 | 75 | MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \ 76 | "OpenVR Advanced Settings is already installed. $\n$\nClick `OK` to upgrade the \ 77 | existing installation or `Cancel` to cancel this upgrade." \ 78 | IDOK upgrade 79 | Abort 80 | 81 | upgrade: 82 | StrCpy $upgradeInstallation "true" 83 | done: 84 | FunctionEnd 85 | 86 | ;-------------------------------- 87 | ;Installer Sections 88 | 89 | Section "Install" SecInstall 90 | 91 | !insertmacro TerminateOverlay 92 | 93 | StrCmp $upgradeInstallation "true" 0 noupgrade 94 | DetailPrint "Uninstall previous version..." 95 | ExecWait '"$INSTDIR\Uninstall.exe" /S _?=$INSTDIR' 96 | Delete $INSTDIR\Uninstall.exe 97 | Goto afterupgrade 98 | 99 | noupgrade: 100 | 101 | afterupgrade: 102 | 103 | SetOutPath "$INSTDIR" 104 | 105 | ;ADD YOUR OWN FILES HERE... 106 | File "${SRCDIR}\LICENSE.txt" 107 | File "${BASEDIR}\*.exe" 108 | File "${THIRDDIR}\openvr\bin\win64\*.dll" 109 | File "${BASEDIR}\*.dll" 110 | File "${SRCDIR}\*.bat" 111 | File "${SRCDIR}\*.vrmanifest" 112 | File "${SRCDIR}\*.conf" 113 | File /r "${SRCDIR}\res" 114 | File /r "${BASEDIR}\qtdata" 115 | 116 | ; Install redistributable 117 | ExecWait '"$INSTDIR\vcredist_x64.exe" /install /quiet' 118 | 119 | ; Install the vrmanifest 120 | nsExec::ExecToLog '"$INSTDIR\AdvancedSettings.exe" -installmanifest' 121 | 122 | ;Store installation folder 123 | WriteRegStr HKLM "Software\OpenVR-AdvancedSettings" "" $INSTDIR 124 | 125 | ;Create uninstaller 126 | WriteUninstaller "$INSTDIR\Uninstall.exe" 127 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVRAdvancedSettings" "DisplayName" "OpenVR Advanced Settings" 128 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVRAdvancedSettings" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" 129 | 130 | ; If SteamVR is already running, execute the dashboard as the user 131 | FindWindow $0 "Qt5QWindowIcon" "SteamVR Status" 132 | StrCmp $0 0 +2 133 | Exec '"$INSTDIR\AdvancedSettings.exe"' 134 | 135 | SectionEnd 136 | 137 | ;-------------------------------- 138 | ;Uninstaller Section 139 | 140 | Section "Uninstall" 141 | 142 | !insertmacro TerminateOverlay 143 | 144 | ; Remove the vrmanifest 145 | nsExec::ExecToLog '"$INSTDIR\AdvancedSettings.exe" -removemanifest' 146 | 147 | ; Delete installed files 148 | !include uninstallFiles.list 149 | 150 | DeleteRegKey HKLM "Software\OpenVR-AdvancedSettings" 151 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVRAdvancedSettings" 152 | 153 | 154 | 155 | SectionEnd 156 | 157 | -------------------------------------------------------------------------------- /installer/listUninstallFiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Execute this script in the root folder of the install dir 4 | # Dont't forget to set OUTPUTFILE to a path that is writeable 5 | 6 | OUTPUTFILE=../../installed_files.txt 7 | INSTALLDIR=. 8 | 9 | # Get command line arguments 10 | if [ $# -eq 1 ]; then 11 | OUTPUTFILE=$1 12 | elif [ $# -gt 1 ]; then 13 | OUTPUTFILE=$1 14 | INSTALLDIR=$2 15 | fi 16 | 17 | # Find all files 18 | find "$INSTALLDIR" -iname '*' -type f -exec echo "Delete \$INSTDIR/{}" \; > $OUTPUTFILE 19 | 20 | # Find all directories and print them out in reverse order 21 | find "$INSTALLDIR" -iname '*' -type d -exec echo "RMdir \$INSTDIR/{}" \; | tac.exe >> $OUTPUTFILE 22 | 23 | # Remove "/./" from the file paths 24 | sed -i 's/\/\.//g' $OUTPUTFILE 25 | 26 | # Replace "/" with "\" 27 | sed -i 's/\//\\/g' $OUTPUTFILE 28 | -------------------------------------------------------------------------------- /src/manifest.vrmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "source" : "builtin", 3 | "applications": [{ 4 | "app_key": "matzman666.AdvancedSettings", 5 | "launch_type": "binary", 6 | "binary_path_windows": "AdvancedSettings.exe", 7 | "is_dashboard_overlay": true, 8 | 9 | "strings": { 10 | "en_us": { 11 | "name": "Advanced Settings", 12 | "description": "OpenVR Advanced Settings Overlay" 13 | } 14 | } 15 | }] 16 | } 17 | -------------------------------------------------------------------------------- /src/overlaycontroller.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include 6 | // because of incompatibilities with QtOpenGL and GLEW we need to cherry pick 7 | // includes 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include "utils/ChaperoneUtils.h" 27 | 28 | #include "tabcontrollers/SteamVRTabController.h" 29 | #include "tabcontrollers/ChaperoneTabController.h" 30 | #include "tabcontrollers/MoveCenterTabController.h" 31 | #include "tabcontrollers/FixFloorTabController.h" 32 | #include "tabcontrollers/AudioTabController.h" 33 | #include "tabcontrollers/StatisticsTabController.h" 34 | #include "tabcontrollers/SettingsTabController.h" 35 | #include "tabcontrollers/ReviveTabController.h" 36 | #include "tabcontrollers/UtilitiesTabController.h" 37 | #include "tabcontrollers/AccessibilityTabController.h" 38 | 39 | // application namespace 40 | namespace advsettings 41 | { 42 | class OverlayController : public QObject 43 | { 44 | Q_OBJECT 45 | Q_PROPERTY( bool desktopMode READ isDesktopMode ) 46 | 47 | public: 48 | static constexpr const char* applicationKey = "matzman666.AdvancedSettings"; 49 | static constexpr const char* applicationName = "Advanced Settings"; 50 | static constexpr const char* applicationVersionString = "v2.5"; 51 | 52 | private: 53 | vr::VROverlayHandle_t m_ulOverlayHandle = vr::k_ulOverlayHandleInvalid; 54 | vr::VROverlayHandle_t m_ulOverlayThumbnailHandle 55 | = vr::k_ulOverlayHandleInvalid; 56 | 57 | std::unique_ptr m_pRenderControl; 58 | std::unique_ptr m_pWindow; 59 | std::unique_ptr m_pFbo; 60 | std::unique_ptr m_pOpenGLContext; 61 | std::unique_ptr m_pOffscreenSurface; 62 | 63 | std::unique_ptr m_pPumpEventsTimer; 64 | std::unique_ptr m_pRenderTimer; 65 | bool dashboardVisible = false; 66 | 67 | QPoint m_ptLastMouse; 68 | Qt::MouseButtons m_lastMouseButtons = 0; 69 | 70 | bool desktopMode; 71 | bool noSound; 72 | 73 | QUrl m_runtimePathUrl; 74 | 75 | utils::ChaperoneUtils m_chaperoneUtils; 76 | 77 | QSoundEffect activationSoundEffect; 78 | QSoundEffect focusChangedSoundEffect; 79 | QSoundEffect alarm01SoundEffect; 80 | 81 | public: // I know it's an ugly hack to make them public to enable external 82 | // access, but I am too lazy to implement getters. 83 | SteamVRTabController steamVRTabController; 84 | ChaperoneTabController chaperoneTabController; 85 | MoveCenterTabController moveCenterTabController; 86 | FixFloorTabController fixFloorTabController; 87 | AudioTabController audioTabController; 88 | StatisticsTabController statisticsTabController; 89 | SettingsTabController settingsTabController; 90 | ReviveTabController reviveTabController; 91 | UtilitiesTabController utilitiesTabController; 92 | AccessibilityTabController accessibilityTabController; 93 | 94 | private: 95 | OverlayController( bool desktopMode, bool noSound ) 96 | : QObject(), desktopMode( desktopMode ), noSound( noSound ) 97 | { 98 | } 99 | QPoint getMousePositionForEvent( vr::VREvent_Mouse_t mouse ); 100 | 101 | public: 102 | virtual ~OverlayController(); 103 | 104 | void Init( QQmlEngine* qmlEngine ); 105 | void Shutdown(); 106 | 107 | bool isDashboardVisible() 108 | { 109 | return dashboardVisible; 110 | } 111 | 112 | void SetWidget( QQuickItem* quickItem, 113 | const std::string& name, 114 | const std::string& key = "" ); 115 | 116 | void AddOffsetToUniverseCenter( vr::ETrackingUniverseOrigin universe, 117 | unsigned axisId, 118 | float offset, 119 | bool adjustBounds = true, 120 | bool commit = true ); 121 | void AddOffsetToUniverseCenter( vr::ETrackingUniverseOrigin universe, 122 | float offset[3], 123 | bool adjustBounds = true, 124 | bool commit = true ); 125 | void RotateUniverseCenter( vr::ETrackingUniverseOrigin universe, 126 | float yAngle, 127 | bool adjustBounds = true, 128 | bool commit = true ); // around y axis 129 | void AddOffsetToCollisionBounds( unsigned axisId, 130 | float offset, 131 | bool commit = true ); 132 | void AddOffsetToCollisionBounds( float offset[3], bool commit = true ); 133 | void RotateCollisionBounds( float angle, 134 | bool commit = true ); // around y axis 135 | 136 | bool isDesktopMode() 137 | { 138 | return desktopMode; 139 | }; 140 | 141 | utils::ChaperoneUtils& chaperoneUtils() noexcept 142 | { 143 | return m_chaperoneUtils; 144 | } 145 | 146 | Q_INVOKABLE QString getVersionString(); 147 | Q_INVOKABLE QUrl getVRRuntimePathUrl(); 148 | 149 | Q_INVOKABLE bool soundDisabled(); 150 | 151 | const vr::VROverlayHandle_t& overlayHandle(); 152 | const vr::VROverlayHandle_t& overlayThumbnailHandle(); 153 | 154 | bool pollNextEvent( vr::VROverlayHandle_t ulOverlayHandle, 155 | vr::VREvent_t* pEvent ); 156 | 157 | public slots: 158 | void renderOverlay(); 159 | void OnRenderRequest(); 160 | void OnTimeoutPumpEvents(); 161 | 162 | void showKeyboard( QString existingText, unsigned long userValue = 0 ); 163 | 164 | void playActivationSound(); 165 | void playFocusChangedSound(); 166 | void playAlarm01Sound( bool loop = false ); 167 | void setAlarm01SoundVolume( float vol ); 168 | void cancelAlarm01Sound(); 169 | 170 | signals: 171 | void keyBoardInputSignal( QString input, unsigned long userValue = 0 ); 172 | 173 | private: 174 | static QSettings* _appSettings; 175 | static std::unique_ptr singleton; 176 | 177 | public: 178 | static OverlayController* getInstance() 179 | { 180 | return singleton.get(); 181 | } 182 | 183 | static OverlayController* createInstance( bool desktopMode, bool noSound ) 184 | { 185 | singleton.reset( 186 | new advsettings::OverlayController( desktopMode, noSound ) ); 187 | return singleton.get(); 188 | } 189 | 190 | static QSettings* appSettings() 191 | { 192 | return _appSettings; 193 | } 194 | 195 | static void setAppSettings( QSettings* settings ) 196 | { 197 | _appSettings = settings; 198 | } 199 | }; 200 | 201 | } // namespace advsettings 202 | -------------------------------------------------------------------------------- /src/qt.conf: -------------------------------------------------------------------------------- 1 | [Paths] 2 | Prefix = qtdata 3 | Qml2Imports = . 4 | Imports = . 5 | [Platforms] 6 | WindowsArguments = dpiawareness=0 7 | -------------------------------------------------------------------------------- /src/res/battery_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/battery_0.png -------------------------------------------------------------------------------- /src/res/battery_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/battery_1.png -------------------------------------------------------------------------------- /src/res/battery_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/battery_2.png -------------------------------------------------------------------------------- /src/res/battery_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/battery_3.png -------------------------------------------------------------------------------- /src/res/battery_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/battery_4.png -------------------------------------------------------------------------------- /src/res/battery_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/battery_5.png -------------------------------------------------------------------------------- /src/res/qml/AccessibilityPage.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.3 4 | import matzman666.advsettings 1.0 5 | 6 | 7 | 8 | MyStackViewPage { 9 | headerText: "Accessibility Tools" 10 | 11 | PttControllerConfigDialog { 12 | id: pttControllerConfigDialog 13 | pttControllerConfigClass: AccessibilityTabController 14 | } 15 | 16 | content: ColumnLayout { 17 | spacing: 92 18 | 19 | GroupBox { 20 | Layout.fillWidth: true 21 | 22 | label: MyText { 23 | leftPadding: 10 24 | text: "Adjust Player Height" 25 | bottomPadding: -10 26 | } 27 | background: Rectangle { 28 | color: "transparent" 29 | border.color: "#ffffff" 30 | radius: 8 31 | } 32 | 33 | ColumnLayout { 34 | anchors.fill: parent 35 | 36 | Rectangle { 37 | color: "#ffffff" 38 | height: 1 39 | Layout.fillWidth: true 40 | Layout.bottomMargin: 5 41 | } 42 | 43 | RowLayout { 44 | MyPushButton2 { 45 | Layout.preferredWidth: 40 46 | text: "-" 47 | onClicked: { 48 | accessibilityMoveYSlider.value -= 0.05 49 | } 50 | } 51 | 52 | MySlider { 53 | id: accessibilityMoveYSlider 54 | from: 0 55 | to: 1.5 56 | stepSize: 0.01 57 | value: 0.0 58 | Layout.fillWidth: true 59 | onPositionChanged: { 60 | var val = this.from + ( this.position * (this.to - this.from)) 61 | accessibilityMoveYText.text = val.toFixed(2) 62 | } 63 | onValueChanged: { 64 | AccessibilityTabController.heightOffset = this.value.toFixed(2) 65 | } 66 | } 67 | 68 | MyPushButton2 { 69 | Layout.preferredWidth: 40 70 | text: "+" 71 | onClicked: { 72 | accessibilityMoveYSlider.value += 0.05 73 | } 74 | } 75 | 76 | MyTextField { 77 | id: accessibilityMoveYText 78 | text: "0.00" 79 | keyBoardUID: 700 80 | Layout.preferredWidth: 140 81 | Layout.leftMargin: 10 82 | Layout.rightMargin: 10 83 | horizontalAlignment: Text.AlignHCenter 84 | function onInputEvent(input) { 85 | var val = parseFloat(input) 86 | if (!isNaN(val)) { 87 | if (val >= accessibilityMoveYSlider.from && val <= accessibilityMoveYSlider.to) { 88 | accessibilityMoveYSlider.value = val.toFixed(2); 89 | } else { 90 | AccessibilityTabController.setHeightOffset(val.toFixed(2), false); 91 | } 92 | } 93 | text = AccessibilityTabController.heightOffset.toFixed(2) 94 | } 95 | } 96 | } 97 | 98 | RowLayout { 99 | MyToggleButton { 100 | id: heightOffsetPttEnabledToggle 101 | Layout.preferredWidth: 260 102 | text: "Push-to-Toggle:" 103 | onClicked: { 104 | AccessibilityTabController.pttEnabled = checked 105 | } 106 | } 107 | MyToggleButton { 108 | id: heightOffsetPttLeftControllerToggle 109 | text: "Left Controller" 110 | onClicked: { 111 | AccessibilityTabController.setPttLeftControllerEnabled(checked, false) 112 | } 113 | } 114 | MyPushButton { 115 | text: "Configure" 116 | onClicked: { 117 | pttControllerConfigDialog.openPopup(0) 118 | } 119 | } 120 | Item { 121 | Layout.fillWidth: true 122 | } 123 | MyToggleButton { 124 | id: heightOffsetPttRightControllerToggle 125 | text: "Right Controller" 126 | onClicked: { 127 | AccessibilityTabController.setPttRightControllerEnabled(checked, false) 128 | } 129 | } 130 | MyPushButton { 131 | text: "Configure" 132 | onClicked: { 133 | pttControllerConfigDialog.openPopup(1) 134 | } 135 | } 136 | } 137 | } 138 | } 139 | 140 | Item { Layout.fillHeight: true; Layout.fillWidth: true} 141 | 142 | MyPushButton { 143 | id: accessibilityResetButton 144 | Layout.preferredWidth: 250 145 | text: "Reset" 146 | onClicked: { 147 | AccessibilityTabController.reset() 148 | } 149 | } 150 | 151 | Component.onCompleted: { 152 | var heightOffsetFormatted = AccessibilityTabController.heightOffset.toFixed(2) 153 | if (heightOffsetFormatted >= accessibilityMoveYSlider.from && heightOffsetFormatted <= accessibilityMoveYSlider.to) { 154 | accessibilityMoveYSlider.value = heightOffsetFormatted 155 | } 156 | accessibilityMoveYText.text = heightOffsetFormatted 157 | heightOffsetPttEnabledToggle.checked = AccessibilityTabController.pttEnabled 158 | heightOffsetPttLeftControllerToggle.checked = AccessibilityTabController.pttLeftControllerEnabled 159 | heightOffsetPttRightControllerToggle.checked = AccessibilityTabController.pttRightControllerEnabled 160 | } 161 | 162 | Connections { 163 | target: AccessibilityTabController 164 | onHeightOffsetChanged: { 165 | var heightOffsetFormatted = AccessibilityTabController.heightOffset.toFixed(2) 166 | if (heightOffsetFormatted >= accessibilityMoveYSlider.from && heightOffsetFormatted <= accessibilityMoveYSlider.to) { 167 | accessibilityMoveYSlider.value = heightOffsetFormatted 168 | } 169 | accessibilityMoveYText.text = heightOffsetFormatted 170 | } 171 | onPttEnabledChanged: { 172 | heightOffsetPttEnabledToggle.checked = AccessibilityTabController.pttEnabled 173 | } 174 | onPttActiveChanged: { 175 | 176 | } 177 | onPttLeftControllerEnabledChanged: { 178 | heightOffsetPttLeftControllerToggle.checked = AccessibilityTabController.pttLeftControllerEnabled 179 | } 180 | onPttRightControllerEnabledChanged: { 181 | heightOffsetPttRightControllerToggle.checked = AccessibilityTabController.pttRightControllerEnabled 182 | } 183 | } 184 | 185 | } 186 | 187 | } 188 | -------------------------------------------------------------------------------- /src/res/qml/FixFloorPage.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.3 4 | import matzman666.advsettings 1.0 5 | 6 | 7 | 8 | MyStackViewPage { 9 | headerText: "Playspace Fix" 10 | 11 | content: ColumnLayout { 12 | spacing: 18 13 | 14 | Item { 15 | Layout.fillHeight: true 16 | Layout.fillWidth: true 17 | } 18 | 19 | MyText { 20 | text: "Place one controller on the ground and ensure good visibility to the base stations." 21 | wrapMode: Text.WordWrap 22 | font.pointSize: 28 23 | horizontalAlignment: Text.AlignHCenter 24 | verticalAlignment: Text.AlignVCenter 25 | Layout.fillWidth: true 26 | } 27 | 28 | Item { 29 | Layout.fillHeight: true 30 | Layout.fillWidth: true 31 | } 32 | 33 | MyText { 34 | id: statusMessageText 35 | enabled: false 36 | text: "Status Text" 37 | horizontalAlignment: Text.AlignHCenter 38 | verticalAlignment: Text.AlignVCenter 39 | Layout.fillWidth: true 40 | } 41 | 42 | Item { 43 | Layout.fillHeight: true 44 | Layout.fillWidth: true 45 | } 46 | 47 | MyPushButton { 48 | id: fixButton 49 | Layout.fillWidth: true 50 | text: "Fix Floor" 51 | Layout.preferredHeight: 100 52 | onClicked: { 53 | FixFloorTabController.fixFloorClicked() 54 | } 55 | } 56 | 57 | MyPushButton { 58 | id: recenterButton 59 | Layout.fillWidth: true 60 | text: "Recenter Playspace" 61 | Layout.preferredHeight: 100 62 | onClicked: { 63 | FixFloorTabController.recenterClicked() 64 | } 65 | } 66 | 67 | MyPushButton { 68 | id: undoFixButton 69 | enabled: false 70 | Layout.fillWidth: true 71 | text: "Undo Fix" 72 | onClicked: { 73 | FixFloorTabController.undoFixFloorClicked() 74 | } 75 | } 76 | 77 | Item { 78 | Layout.preferredHeight: 32 79 | } 80 | 81 | Component.onCompleted: { 82 | statusMessageText.text = "" 83 | undoFixButton.enabled = FixFloorTabController.canUndo 84 | fixButton.enabled = true 85 | } 86 | 87 | Timer { 88 | id: statusMessageTimer 89 | repeat: false 90 | onTriggered: { 91 | statusMessageText.text = "" 92 | } 93 | } 94 | 95 | Connections { 96 | target: FixFloorTabController 97 | onStatusMessageSignal: { 98 | if (statusMessageTimer.running) { 99 | statusMessageTimer.stop() 100 | } 101 | statusMessageText.text = FixFloorTabController.currentStatusMessage() 102 | statusMessageTimer.interval = FixFloorTabController.currentStatusMessageTimeout() * 1000 103 | statusMessageTimer.start() 104 | } 105 | onMeasureStartSignal: { 106 | fixButton.enabled = false 107 | undoFixButton.enabled = false 108 | } 109 | onMeasureEndSignal: { 110 | fixButton.enabled = true 111 | undoFixButton.enabled = FixFloorTabController.canUndo 112 | } 113 | onCanUndoChanged: { 114 | undoFixButton.enabled = FixFloorTabController.canUndo 115 | } 116 | } 117 | 118 | } 119 | 120 | } 121 | -------------------------------------------------------------------------------- /src/res/qml/MyComboBox.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import "." // QTBUG-34418, singletons require explicit import to load qmldir file 4 | 5 | 6 | ComboBox { 7 | id: myComboBox 8 | hoverEnabled: true 9 | 10 | background: Rectangle { 11 | color: parent.pressed ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d") 12 | } 13 | 14 | contentItem: MyText { 15 | leftPadding: 0 16 | rightPadding: parent.indicator.width + parent.spacing 17 | text: parent.displayText 18 | horizontalAlignment: Text.AlignLeft 19 | verticalAlignment: Text.AlignVCenter 20 | elide: Text.ElideRight 21 | } 22 | 23 | delegate: ItemDelegate { 24 | width: myComboBox.width 25 | text: modelData 26 | hoverEnabled: true 27 | contentItem: MyText { 28 | horizontalAlignment: Text.AlignLeft 29 | verticalAlignment: Text.AlignVCenter 30 | text: parent.text 31 | color: parent.enabled ? "#ffffff" : "#909090" 32 | } 33 | background: Rectangle { 34 | color: parent.pressed ? "#406288" : (parent.hovered ? "#365473" : "#2c435d") 35 | } 36 | } 37 | 38 | indicator: Canvas { 39 | x: parent.width - width - parent.rightPadding 40 | y: parent.topPadding + (parent.availableHeight - height) / 2 41 | width: 13 42 | height: 7 43 | contextType: "2d" 44 | 45 | onPaint: { 46 | if (!context) { 47 | getContext("2d") 48 | } 49 | context.reset(); 50 | context.lineWidth = 2 51 | context.moveTo(1, 1); 52 | context.lineTo(Math.ceil(width / 2), height - 1); 53 | context.lineTo(width - 1, 1); 54 | context.strokeStyle = "#ffffff" 55 | context.stroke() 56 | } 57 | } 58 | 59 | onHoveredChanged: { 60 | if (hovered) { 61 | forceActiveFocus() 62 | } 63 | } 64 | 65 | onActivated: { 66 | if (activeFocus) { 67 | MyResources.playActivationSound() 68 | } 69 | } 70 | 71 | Component.onCompleted: { 72 | popup.background.color = "#2c435d" 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/res/qml/MyDialogOkCancelPopup.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.3 4 | 5 | Popup { 6 | id: myDialogPopup 7 | 8 | implicitHeight: parent.height 9 | implicitWidth: parent.width 10 | 11 | property string dialogTitle: "" 12 | property string dialogText: "" 13 | property int dialogWidth: 600 14 | property int dialogHeight: 300 15 | 16 | property Item dialogContentItem: MyText { 17 | text: dialogText 18 | horizontalAlignment: Text.AlignHCenter 19 | verticalAlignment: Text.AlignVCenter 20 | Layout.fillWidth: true 21 | } 22 | 23 | property bool okClicked: false 24 | 25 | closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent 26 | 27 | background: Rectangle { 28 | color: "black" 29 | opacity: 0.8 30 | } 31 | 32 | contentItem: Item { 33 | Rectangle { 34 | implicitWidth: dialogWidth 35 | implicitHeight: dialogHeight 36 | anchors.centerIn: parent 37 | radius: 24 38 | color: "#1b2939" 39 | border.color: "#cccccc" 40 | border.width: 2 41 | ColumnLayout { 42 | anchors.fill: parent 43 | anchors.margins: 12 44 | MyText { 45 | Layout.leftMargin: 16 46 | Layout.rightMargin: 16 47 | text: dialogTitle 48 | } 49 | Rectangle { 50 | color: "#cccccc" 51 | height: 1 52 | Layout.fillWidth: true 53 | } 54 | Item { 55 | Layout.fillHeight: true 56 | Layout.fillWidth: true 57 | } 58 | ColumnLayout { 59 | id: dialogContent 60 | } 61 | Item { 62 | Layout.fillHeight: true 63 | Layout.fillWidth: true 64 | } 65 | RowLayout { 66 | Layout.fillWidth: true 67 | Layout.leftMargin: 24 68 | Layout.rightMargin: 24 69 | Layout.bottomMargin: 12 70 | MyPushButton { 71 | implicitWidth: 200 72 | text: "Ok" 73 | onClicked: { 74 | okClicked = true 75 | myDialogPopup.close() 76 | } 77 | } 78 | Item { 79 | Layout.fillWidth: true 80 | } 81 | MyPushButton { 82 | implicitWidth: 200 83 | text: "Cancel" 84 | onClicked: { 85 | okClicked = false 86 | myDialogPopup.close() 87 | } 88 | } 89 | } 90 | } 91 | } 92 | } 93 | 94 | Component.onCompleted: { 95 | dialogContentItem.parent = dialogContent 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/res/qml/MyDialogOkPopup.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.3 4 | 5 | Popup { 6 | id: myDialogPopup 7 | 8 | implicitHeight: parent.height 9 | implicitWidth: parent.width 10 | 11 | property string dialogTitle: "" 12 | property string dialogText: "" 13 | property int dialogWidth: 600 14 | property int dialogHeight: 300 15 | 16 | property Item dialogContentItem: MyText { 17 | text: dialogText 18 | horizontalAlignment: Text.AlignHCenter 19 | verticalAlignment: Text.AlignVCenter 20 | Layout.fillWidth: true 21 | } 22 | 23 | property bool okClicked: false 24 | 25 | closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent 26 | 27 | background: Rectangle { 28 | color: "black" 29 | opacity: 0.8 30 | } 31 | 32 | contentItem: Item { 33 | Rectangle { 34 | implicitWidth: dialogWidth 35 | implicitHeight: dialogHeight 36 | anchors.centerIn: parent 37 | radius: 24 38 | color: "#1b2939" 39 | border.color: "#cccccc" 40 | border.width: 2 41 | ColumnLayout { 42 | anchors.fill: parent 43 | anchors.margins: 12 44 | MyText { 45 | Layout.leftMargin: 16 46 | Layout.rightMargin: 16 47 | text: dialogTitle 48 | } 49 | Rectangle { 50 | color: "#cccccc" 51 | height: 1 52 | Layout.fillWidth: true 53 | } 54 | Item { 55 | Layout.fillHeight: true 56 | Layout.fillWidth: true 57 | } 58 | ColumnLayout { 59 | id: dialogContent 60 | } 61 | Item { 62 | Layout.fillHeight: true 63 | Layout.fillWidth: true 64 | } 65 | RowLayout { 66 | Layout.fillWidth: true 67 | Layout.leftMargin: 24 68 | Layout.rightMargin: 24 69 | Layout.bottomMargin: 12 70 | Item { 71 | Layout.fillWidth: true 72 | } 73 | MyPushButton { 74 | implicitWidth: 200 75 | text: "Ok" 76 | onClicked: { 77 | okClicked = true 78 | myDialogPopup.close() 79 | } 80 | } 81 | Item { 82 | Layout.fillWidth: true 83 | } 84 | } 85 | } 86 | } 87 | } 88 | 89 | Component.onCompleted: { 90 | dialogContentItem.parent = dialogContent 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/res/qml/MyPushButton.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import "." // QTBUG-34418, singletons require explicit import to load qmldir file 4 | 5 | Button { 6 | property bool activationSoundEnabled: true 7 | hoverEnabled: true 8 | contentItem: MyText { 9 | horizontalAlignment: Text.AlignHCenter 10 | verticalAlignment: Text.AlignVCenter 11 | text: parent.text 12 | color: parent.enabled ? "#ffffff" : "#909090" 13 | } 14 | background: Rectangle { 15 | color: parent.down ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d") 16 | } 17 | 18 | onHoveredChanged: { 19 | if (hovered) { 20 | forceActiveFocus() 21 | } else { 22 | focus = false 23 | } 24 | } 25 | 26 | onClicked: { 27 | if (activationSoundEnabled) { 28 | MyResources.playActivationSound() 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/res/qml/MyPushButton2.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import "." // QTBUG-34418, singletons require explicit import to load qmldir file 4 | 5 | Button { 6 | hoverEnabled: true 7 | contentItem: MyText { 8 | horizontalAlignment: Text.AlignHCenter 9 | verticalAlignment: Text.AlignVCenter 10 | text: parent.text 11 | color: parent.enabled ? "#ffffff" : "#909090" 12 | } 13 | background: Rectangle { 14 | color: parent.down ? "#406288" : (parent.activeFocus ? "#365473" : "transparent") 15 | border.color: parent.enabled ? "#ffffff" : "#909090" 16 | radius: 8 17 | } 18 | onHoveredChanged: { 19 | if (hovered) { 20 | forceActiveFocus() 21 | } else { 22 | focus = false 23 | } 24 | } 25 | 26 | onClicked: { 27 | MyResources.playActivationSound() 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/res/qml/MyResources.qml: -------------------------------------------------------------------------------- 1 | pragma Singleton 2 | import QtQuick 2.7 3 | import QtMultimedia 5.6 4 | import matzman666.advsettings 1.0 5 | 6 | QtObject { 7 | function playActivationSound() { 8 | OverlayController.playActivationSound() 9 | } 10 | function playFocusChangedSound() { 11 | OverlayController.playFocusChangedSound() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/res/qml/MySlider.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import "." // QTBUG-34418, singletons require explicit import to load qmldir file 4 | 5 | 6 | 7 | Slider { 8 | snapMode: Slider.SnapAlways 9 | wheelEnabled: true 10 | hoverEnabled: true 11 | 12 | background: Rectangle { 13 | x: parent.leftPadding 14 | y: parent.topPadding + parent.availableHeight / 2 - height / 2 15 | width: parent.availableWidth 16 | height: parent.availableHeight 17 | radius: 2 18 | color: parent.activeFocus ? "#2c435d" : "#1b2939" 19 | Rectangle { 20 | y: parent.height / 2 - height / 2 21 | implicitHeight: 4 22 | width: parent.width 23 | height: implicitHeight 24 | radius: 2 25 | color: "#bdbebf" 26 | } 27 | } 28 | 29 | handle: Rectangle { 30 | x: parent.leftPadding + parent.visualPosition * (parent.availableWidth - width) 31 | y: parent.topPadding + parent.availableHeight / 2 - height / 2 32 | implicitWidth: 20 33 | implicitHeight: 40 34 | radius: 4 35 | color: parent.pressed ? "#ffffff" : "#eeeeee" 36 | border.color: "#bdbebf" 37 | } 38 | 39 | onHoveredChanged: { 40 | if (hovered) { 41 | forceActiveFocus() 42 | } else { 43 | focus = false 44 | } 45 | } 46 | 47 | onValueChanged: { 48 | if (activeFocus) { 49 | MyResources.playActivationSound() 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/res/qml/MyStackViewPage.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.2 4 | import "." // QTBUG-34418, singletons require explicit import to load qmldir file 5 | 6 | Rectangle { 7 | color: "#1b2939" 8 | width: 1200 9 | height: 800 10 | 11 | property StackView stackView 12 | 13 | property string headerText: "Header Title" 14 | 15 | property bool headerShowBackButton: true 16 | 17 | property Item header: ColumnLayout { 18 | RowLayout { 19 | Button { 20 | id: headerBackButton 21 | Layout.preferredHeight: 50 22 | Layout.preferredWidth: 50 23 | hoverEnabled: true 24 | enabled: headerShowBackButton 25 | opacity: headerShowBackButton ? 1.0 : 0.0 26 | contentItem: Image { 27 | source: "backarrow.svg" 28 | sourceSize.width: 50 29 | sourceSize.height: 50 30 | anchors.fill: parent 31 | } 32 | background: Rectangle { 33 | opacity: parent.down ? 1.0 : (parent.activeFocus ? 0.5 : 0.0) 34 | color: "#406288" 35 | radius: 4 36 | anchors.fill: parent 37 | } 38 | onHoveredChanged: { 39 | if (hovered) { 40 | forceActiveFocus() 41 | } else { 42 | focus = false 43 | } 44 | } 45 | onClicked: { 46 | MyResources.playFocusChangedSound() 47 | stackView.pop() 48 | } 49 | } 50 | MyText { 51 | id: headerTitle 52 | text: headerText 53 | font.pointSize: 30 54 | anchors.verticalCenter: headerBackButton.verticalCenter 55 | Layout.leftMargin: 32 56 | } 57 | } 58 | 59 | Rectangle { 60 | color: "#cccccc" 61 | height: 1 62 | Layout.topMargin: 10 63 | Layout.fillWidth: true 64 | } 65 | } 66 | 67 | property Item content: Frame { 68 | MyText { 69 | text: "Content" 70 | } 71 | } 72 | 73 | ColumnLayout { 74 | id: mainLayout 75 | spacing: 12 76 | anchors.fill: parent 77 | } 78 | 79 | Component.onCompleted: { 80 | header.parent = mainLayout 81 | header.Layout.leftMargin = 40 82 | header.Layout.topMargin = 30 83 | header.Layout.rightMargin = 40 84 | content.parent = mainLayout 85 | content.Layout.fillHeight = true 86 | content.Layout.fillWidth = true 87 | content.Layout.topMargin = 10 88 | content.Layout.leftMargin = 40 89 | content.Layout.rightMargin = 40 90 | content.Layout.bottomMargin = 40 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/res/qml/MyText.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | 4 | 5 | Text { 6 | color: "#ffffff" 7 | font.pointSize: 20 8 | } 9 | -------------------------------------------------------------------------------- /src/res/qml/MyTextField.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import matzman666.advsettings 1.0 4 | 5 | TextField { 6 | property int keyBoardUID: 0 7 | property string savedText: "" 8 | id: myTextField 9 | color: "#cccccc" 10 | text: "" 11 | font.pointSize: 20 12 | background: Button { 13 | hoverEnabled: true 14 | background: Rectangle { 15 | color: parent.hovered ? "#2c435d" : "#1b2939" 16 | border.color: "#cccccc" 17 | border.width: 2 18 | } 19 | onClicked: { 20 | myTextField.forceActiveFocus() 21 | } 22 | } 23 | onActiveFocusChanged: { 24 | if (activeFocus) { 25 | if (!OverlayController.desktopMode) { 26 | OverlayController.showKeyboard(text, keyBoardUID) 27 | } else { 28 | savedText = text 29 | } 30 | } 31 | } 32 | onEditingFinished: { 33 | if (OverlayController.desktopMode && savedText !== text) { 34 | myTextField.onInputEvent(text) 35 | } 36 | } 37 | function onInputEvent(input) { 38 | text = input 39 | } 40 | Connections { 41 | target: OverlayController 42 | onKeyBoardInputSignal: { 43 | if (userValue == keyBoardUID) { 44 | if (myTextField.text !== input) { 45 | myTextField.onInputEvent(input) 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/res/qml/MyToggleButton.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import "." // QTBUG-34418, singletons require explicit import to load qmldir file 4 | 5 | 6 | CheckBox { 7 | checkState: Qt.Checked 8 | tristate: false 9 | hoverEnabled: true 10 | spacing: 12 11 | 12 | indicator: Rectangle { 13 | implicitWidth: 28 14 | implicitHeight: 28 15 | x: parent.leftPadding 16 | y: parent.height / 2 - height / 2 17 | color: parent.enabled ? (parent.down ? "#e0e0e0" : "#ffffff") : "#a0a0a0" 18 | border.width: 0 19 | Path { 20 | startX: 0 21 | startY: 0 22 | PathLine { 23 | x: 40 24 | y: 40 25 | } 26 | } 27 | 28 | Image { 29 | width: 28 30 | height: 28 31 | x: (parent.width - width) / 2 32 | y: (parent.height - height) / 2 33 | source: "check.svg" 34 | sourceSize.width: width 35 | sourceSize.height: height 36 | visible: parent.parent.checked 37 | } 38 | } 39 | 40 | contentItem: MyText { 41 | text: parent.text 42 | horizontalAlignment: Text.AlignLeft 43 | verticalAlignment: Text.AlignVCenter 44 | leftPadding: parent.indicator.width + parent.spacing 45 | color: parent.enabled ? "#ffffff" : "#909090" 46 | } 47 | 48 | background: Rectangle { 49 | color: "#2c435d" 50 | opacity: parent.activeFocus ? 1.0 : 0 51 | } 52 | 53 | onHoveredChanged: { 54 | if (hovered) { 55 | forceActiveFocus() 56 | } else { 57 | focus = false 58 | } 59 | } 60 | 61 | onClicked: { 62 | MyResources.playActivationSound() 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/res/qml/PttControllerConfigDialog.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.3 4 | import matzman666.advsettings 1.0 5 | 6 | MyDialogOkCancelPopup { 7 | id: pttControllerConfigDialog 8 | property var pttControllerConfigClass 9 | property int controllerIndex: -1 10 | dialogTitle: "Controller Configuration" 11 | dialogWidth: 600 12 | dialogHeight: 620 13 | dialogContentItem: ColumnLayout { 14 | MyText { 15 | text: "Buttons" 16 | } 17 | Rectangle { 18 | color: "#cccccc" 19 | height: 1 20 | Layout.fillWidth: true 21 | } 22 | MyToggleButton { 23 | id: pttControllerConfigGripButtonToggle 24 | text: "Grip" 25 | } 26 | MyToggleButton { 27 | id: pttControllerConfigMenuButtonToggle 28 | text: "Menu" 29 | } 30 | MyToggleButton { 31 | id: pttControllerConfigTriggerButtonToggle 32 | text: "Trigger" 33 | } 34 | 35 | MyText { 36 | Layout.topMargin: 32 37 | text: "Touchpad" 38 | } 39 | Rectangle { 40 | color: "#cccccc" 41 | height: 1 42 | Layout.fillWidth: true 43 | } 44 | RowLayout { 45 | spacing: 64 46 | MyToggleButton { 47 | id: pttControllerConfigPadLeftToggle 48 | text: "Left" 49 | } 50 | MyToggleButton { 51 | id: pttControllerConfigPadRightToggle 52 | text: "Right" 53 | } 54 | } 55 | RowLayout { 56 | spacing: 64 57 | MyToggleButton { 58 | id: pttControllerConfigPadTopToggle 59 | text: "Top" 60 | } 61 | MyToggleButton { 62 | id: pttControllerConfigPadBottomToggle 63 | text: "Bottom" 64 | } 65 | } 66 | RowLayout { 67 | MyText { 68 | text: "Mode:" 69 | } 70 | MyComboBox { 71 | id: pttControllerConfigPadModeCombo 72 | Layout.preferredWidth: 250 73 | model: ["Disabled", "Touched", "Pressed"] 74 | } 75 | } 76 | } 77 | onClosed: { 78 | if (okClicked) { 79 | var buttons = [] 80 | if (pttControllerConfigGripButtonToggle.checked) { 81 | buttons.push(2) 82 | } 83 | if (pttControllerConfigMenuButtonToggle.checked) { 84 | buttons.push(1) 85 | } 86 | var triggerMode = 0 87 | if (pttControllerConfigTriggerButtonToggle.checked) { 88 | triggerMode = 1 89 | } 90 | var padAreas = 0 91 | if (pttControllerConfigPadLeftToggle.checked) { 92 | padAreas |= (1 << 0) 93 | } 94 | if (pttControllerConfigPadTopToggle.checked) { 95 | padAreas |= (1 << 1) 96 | } 97 | if (pttControllerConfigPadRightToggle.checked) { 98 | padAreas |= (1 << 2) 99 | } 100 | if (pttControllerConfigPadBottomToggle.checked) { 101 | padAreas |= (1 << 3) 102 | } 103 | pttControllerConfigClass.setPttControllerConfig(controllerIndex, buttons, triggerMode, pttControllerConfigPadModeCombo.currentIndex, padAreas); 104 | } 105 | } 106 | function openPopup(controller) { 107 | if (controller === 0) { 108 | dialogTitle = "Left Controller Configuration" 109 | controllerIndex = 0 110 | } else { 111 | dialogTitle = "Right Controller Configuration" 112 | controllerIndex = 1 113 | } 114 | pttControllerConfigGripButtonToggle.checked = false 115 | pttControllerConfigMenuButtonToggle.checked = false 116 | pttControllerConfigTriggerButtonToggle.checked = false 117 | pttControllerConfigPadLeftToggle.checked = false 118 | pttControllerConfigPadTopToggle.checked = false 119 | pttControllerConfigPadRightToggle.checked = false 120 | pttControllerConfigPadBottomToggle.checked = false 121 | pttControllerConfigPadModeCombo.currentIndex = pttControllerConfigClass.pttTouchpadMode(controllerIndex) 122 | var buttons = pttControllerConfigClass.pttDigitalButtons(controllerIndex) 123 | for (var i = 0; i < buttons.length; i++) { 124 | if (buttons[i] == 1) { 125 | pttControllerConfigMenuButtonToggle.checked = true 126 | } else if (buttons[i] == 2) { 127 | pttControllerConfigGripButtonToggle.checked = true 128 | } 129 | } 130 | if (pttControllerConfigClass.pttTriggerMode(controllerIndex) > 0) { 131 | pttControllerConfigTriggerButtonToggle.checked = true 132 | } 133 | var padAreas = pttControllerConfigClass.pttTouchpadArea(controllerIndex) 134 | if (padAreas & (1 << 0)) { 135 | pttControllerConfigPadLeftToggle.checked = true 136 | } 137 | if (padAreas & (1 << 1)) { 138 | pttControllerConfigPadTopToggle.checked = true 139 | } 140 | if (padAreas & (1 << 2)) { 141 | pttControllerConfigPadRightToggle.checked = true 142 | } 143 | if (padAreas & (1 << 3)) { 144 | pttControllerConfigPadBottomToggle.checked = true 145 | } 146 | open() 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /src/res/qml/SettingsPage.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.3 4 | import matzman666.advsettings 1.0 5 | 6 | 7 | MyStackViewPage { 8 | headerText: "Application Settings" 9 | 10 | content: ColumnLayout { 11 | spacing: 18 12 | 13 | MyToggleButton { 14 | id: settingsAutoStartToggle 15 | text: "Autostart" 16 | onCheckedChanged: { 17 | SettingsTabController.setAutoStartEnabled(checked, false) 18 | } 19 | } 20 | 21 | MyToggleButton { 22 | id: forceReviveToggle 23 | text: "Force Revive Page" 24 | onCheckedChanged: { 25 | SettingsTabController.setForceRevivePage(checked, true) 26 | } 27 | } 28 | 29 | Item { 30 | Layout.fillHeight: true 31 | } 32 | 33 | Component.onCompleted: { 34 | settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled 35 | forceReviveToggle.checked = SettingsTabController.forceRevivePage 36 | } 37 | 38 | Connections { 39 | target: SettingsTabController 40 | onAutoStartEnabledChanged: { 41 | settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled 42 | } 43 | onForceRevivePageChanged: { 44 | forceReviveToggle.checked = SettingsTabController.forceRevivePage 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/res/qml/StatisticsPage.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.3 4 | import matzman666.advsettings 1.0 5 | 6 | 7 | 8 | MyStackViewPage { 9 | headerText: "Statistics" 10 | 11 | content: ColumnLayout { 12 | spacing: 18 13 | 14 | GridLayout { 15 | columns: 3 16 | 17 | MyText { 18 | text: "HMD Distance Moved:" 19 | } 20 | 21 | MyText { 22 | id: statsHmdMovedText 23 | text: "-00.0" 24 | Layout.fillWidth: true 25 | horizontalAlignment: Text.AlignRight 26 | Layout.rightMargin: 10 27 | } 28 | 29 | MyPushButton { 30 | text: "Reset" 31 | onClicked: { 32 | StatisticsTabController.statsDistanceResetClicked() 33 | } 34 | } 35 | 36 | MyText { 37 | text: "HMD Rotations:" 38 | } 39 | 40 | MyText { 41 | id: statsHmdRotationText 42 | text: "0.0 CCW" 43 | Layout.fillWidth: true 44 | horizontalAlignment: Text.AlignRight 45 | Layout.rightMargin: 10 46 | } 47 | 48 | MyPushButton { 49 | text: "Reset" 50 | onClicked: { 51 | StatisticsTabController.statsRotationResetClicked() 52 | } 53 | } 54 | 55 | MyText { 56 | text: "Left Controller Max Speed:" 57 | } 58 | 59 | MyText { 60 | id: statsLeftControllerSpeedText 61 | text: "99.9 m/s" 62 | Layout.fillWidth: true 63 | horizontalAlignment: Text.AlignRight 64 | Layout.rightMargin: 10 65 | } 66 | 67 | MyPushButton { 68 | text: "Reset" 69 | onClicked: { 70 | StatisticsTabController.statsLeftControllerSpeedResetClicked() 71 | } 72 | } 73 | 74 | MyText { 75 | text: "Right Controller Max Speed:" 76 | } 77 | 78 | MyText { 79 | id: statsRightControllerSpeedText 80 | text: "99.9 m/s" 81 | Layout.fillWidth: true 82 | horizontalAlignment: Text.AlignRight 83 | Layout.rightMargin: 10 84 | } 85 | 86 | MyPushButton { 87 | text: "Reset" 88 | onClicked: { 89 | StatisticsTabController.statsRightControllerSpeedResetClicked() 90 | } 91 | } 92 | } 93 | 94 | GridLayout { 95 | columns: 3 96 | Layout.topMargin: 32 97 | 98 | MyText { 99 | text: "Presented Frames:" 100 | } 101 | 102 | MyText { 103 | id: statsPresentedFramesText 104 | text: "000" 105 | Layout.fillWidth: true 106 | horizontalAlignment: Text.AlignRight 107 | Layout.rightMargin: 10 108 | } 109 | 110 | MyPushButton { 111 | text: "Reset" 112 | onClicked: { 113 | StatisticsTabController.presentedFramesResetClicked() 114 | } 115 | } 116 | 117 | MyText { 118 | text: "Dropped Frames:" 119 | } 120 | 121 | MyText { 122 | id: statsDroppedFramesText 123 | text: "000" 124 | Layout.fillWidth: true 125 | horizontalAlignment: Text.AlignRight 126 | Layout.rightMargin: 10 127 | } 128 | 129 | MyPushButton { 130 | text: "Reset" 131 | onClicked: { 132 | StatisticsTabController.droppedFramesResetClicked() 133 | } 134 | } 135 | 136 | MyText { 137 | text: "Reprojected Frames:" 138 | } 139 | 140 | MyText { 141 | id: statsReprojectionFramesText 142 | text: "000" 143 | Layout.fillWidth: true 144 | horizontalAlignment: Text.AlignRight 145 | Layout.rightMargin: 10 146 | } 147 | 148 | MyPushButton { 149 | text: "Reset" 150 | onClicked: { 151 | StatisticsTabController.reprojectedFramesResetClicked() 152 | } 153 | } 154 | 155 | MyText { 156 | text: "Timed Out:" 157 | } 158 | 159 | MyText { 160 | id: statsTimedOutText 161 | text: "000" 162 | Layout.fillWidth: true 163 | horizontalAlignment: Text.AlignRight 164 | Layout.rightMargin: 10 165 | } 166 | 167 | MyPushButton { 168 | text: "Reset" 169 | onClicked: { 170 | StatisticsTabController.timedOutResetClicked() 171 | } 172 | } 173 | 174 | MyText { 175 | text: "Reprojection Ratio:" 176 | } 177 | 178 | MyText { 179 | id: statstotalRatioText 180 | text: "0.0" 181 | Layout.fillWidth: true 182 | horizontalAlignment: Text.AlignRight 183 | Layout.rightMargin: 10 184 | } 185 | 186 | MyPushButton { 187 | text: "Reset" 188 | onClicked: { 189 | StatisticsTabController.totalRatioResetClicked() 190 | } 191 | } 192 | } 193 | Item { 194 | Layout.fillHeight: true 195 | } 196 | 197 | function updateStatistics() { 198 | statsHmdMovedText.text = StatisticsTabController.hmdDistanceMoved.toFixed(1) + " m" 199 | var rotations = StatisticsTabController.hmdRotations 200 | if (rotations > 0) { 201 | statsHmdRotationText.text = rotations.toFixed(1) + " CCW" 202 | } else { 203 | statsHmdRotationText.text = -rotations.toFixed(1) + " CW" 204 | } 205 | statsLeftControllerSpeedText.text = " " + StatisticsTabController.leftControllerMaxSpeed.toFixed(1) + " m/s" 206 | statsRightControllerSpeedText.text = " " + StatisticsTabController.rightControllerMaxSpeed.toFixed(1) + " m/s" 207 | statsPresentedFramesText.text = StatisticsTabController.presentedFrames 208 | statsDroppedFramesText.text = StatisticsTabController.droppedFrames 209 | statsReprojectionFramesText.text = StatisticsTabController.reprojectedFrames 210 | statsTimedOutText.text = StatisticsTabController.timedOut 211 | statstotalRatioText.text = (StatisticsTabController.totalReprojectedRatio*100.0).toFixed(1) + "%" 212 | } 213 | 214 | Timer { 215 | id: statisticsUpdateTimer 216 | repeat: true 217 | interval: 100 218 | onTriggered: { 219 | parent.updateStatistics() 220 | } 221 | } 222 | 223 | onVisibleChanged: { 224 | if (visible) { 225 | updateStatistics() 226 | statisticsUpdateTimer.start() 227 | } else { 228 | statisticsUpdateTimer.stop() 229 | } 230 | } 231 | 232 | } 233 | 234 | } 235 | -------------------------------------------------------------------------------- /src/res/qml/backarrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | 21 | image/svg+xml 22 | 24 | 25 | 26 | 27 | 28 | 30 | 32 | 36 | 40 | 41 | 42 | 62 | 65 | 66 | 70 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/res/qml/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/res/qml/mainwidget.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Controls 2.0 3 | import QtQuick.Layouts 1.0 4 | 5 | 6 | Rectangle { 7 | id: root 8 | color: "#1b2939" 9 | width: 1200 10 | height: 800 11 | 12 | property RootPage rootPage: RootPage { 13 | stackView: mainView 14 | } 15 | 16 | property SteamVRPage steamVRPage: SteamVRPage { 17 | stackView: mainView 18 | visible: false 19 | } 20 | 21 | property ChaperonePage chaperonePage: ChaperonePage { 22 | stackView: mainView 23 | visible: false 24 | } 25 | 26 | property ChaperoneWarningsPage chaperoneWarningsPage: ChaperoneWarningsPage { 27 | stackView: mainView 28 | visible: false 29 | } 30 | 31 | property PlayspacePage playspacePage: PlayspacePage { 32 | stackView: mainView 33 | visible: false 34 | } 35 | 36 | property FixFloorPage fixFloorPage: FixFloorPage { 37 | stackView: mainView 38 | visible: false 39 | } 40 | 41 | property StatisticsPage statisticsPage: StatisticsPage { 42 | stackView: mainView 43 | visible: false 44 | } 45 | 46 | property SettingsPage settingsPage: SettingsPage { 47 | stackView: mainView 48 | visible: false 49 | } 50 | 51 | property AudioPage audioPage: AudioPage { 52 | stackView: mainView 53 | visible: false 54 | } 55 | 56 | property RevivePage revivePage: RevivePage { 57 | stackView: mainView 58 | visible: false 59 | } 60 | 61 | property UtilitiesPage utilitiesPage: UtilitiesPage { 62 | stackView: mainView 63 | visible: false 64 | } 65 | 66 | property AccessibilityPage accessibilityPage: AccessibilityPage { 67 | stackView: mainView 68 | visible: false 69 | } 70 | 71 | StackView { 72 | id: mainView 73 | anchors.fill: parent 74 | 75 | pushEnter: Transition { 76 | PropertyAnimation { 77 | property: "x" 78 | from: mainView.width 79 | to: 0 80 | duration: 200 81 | } 82 | } 83 | pushExit: Transition { 84 | PropertyAnimation { 85 | property: "x" 86 | from: 0 87 | to: -mainView.width 88 | duration: 200 89 | } 90 | } 91 | popEnter: Transition { 92 | PropertyAnimation { 93 | property: "x" 94 | from: -mainView.width 95 | to: 0 96 | duration: 200 97 | } 98 | } 99 | popExit: Transition { 100 | PropertyAnimation { 101 | property: "x" 102 | from: 0 103 | to: mainView.width 104 | duration: 200 105 | } 106 | } 107 | 108 | initialItem: rootPage 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/res/qml/mic_off.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 46 | 48 | 50 | 53 | 54 | 55 | 59 | 64 | 69 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/res/qml/mic_on.svg: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 18 | 20 | image/svg+xml 21 | 23 | 24 | 25 | 26 | 46 | 48 | 50 | 53 | 54 | 55 | 59 | 64 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/res/qml/ptt_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/qml/ptt_notification.png -------------------------------------------------------------------------------- /src/res/qml/ptt_notification.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 49 | 51 | 53 | 57 | 58 | 59 | 63 | 66 | 71 | 76 | 77 | 78 | 85 | 86 | -------------------------------------------------------------------------------- /src/res/qml/qmldir: -------------------------------------------------------------------------------- 1 | singleton MyResources 1.0 MyResources.qml -------------------------------------------------------------------------------- /src/res/qml/speaker_off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/res/qml/speaker_on.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/res/sounds/alarm01.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/sounds/alarm01.wav -------------------------------------------------------------------------------- /src/res/thumbicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/src/res/thumbicon.png -------------------------------------------------------------------------------- /src/restartvrserver.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM First (optional) parameter is the vr runtime path 4 | REM When no parameter given use default steam install location 5 | IF [%1] == [] ( 6 | SET "steamVRPath=C:\Program Files (x86)\Steam\steamapps\common\SteamVR\" 7 | ) ELSE ( 8 | SET "steamVRPath=%~1" 9 | ) 10 | echo VR Runtime Path: %steamVRPath% 11 | echo. 12 | 13 | REM Kill vrmonitor.exe and give SteamVR some time for a graceful shutdown 14 | REM When no process was killed then exit (helps to prevent the taskkill clone bug) 15 | (taskkill /im vrmonitor.exe /f >nul 2>nul && echo Give SteamVR some time for a graceful shutdown ... && timeout /t 20) || exit 16 | 17 | REM Forcefully kill all remaining processes 18 | taskkill /im vrcompositor.exe /f >nul 2>nul 19 | taskkill /im vrdashboard.exe /f >nul 2>nul 20 | taskkill /im vrserver.exe /f >nul 2>nul 21 | 22 | REM Start vrmonitor.exe 23 | REM start "" "%steamVRPath%\bin\win32\vrmonitor.exe" 24 | start "" "%steamVRPath%\bin\win32\vrstartup.exe" 25 | -------------------------------------------------------------------------------- /src/startdesktopmode.bat: -------------------------------------------------------------------------------- 1 | start AdvancedSettings.exe -desktop -nosound -------------------------------------------------------------------------------- /src/tabcontrollers/AccessibilityTabController.cpp: -------------------------------------------------------------------------------- 1 | #include "AccessibilityTabController.h" 2 | #include 3 | #include "../overlaycontroller.h" 4 | 5 | // application namespace 6 | namespace advsettings 7 | { 8 | void AccessibilityTabController::initStage1() 9 | { 10 | setTrackingUniverse( vr::VRCompositor()->GetTrackingSpace() ); 11 | auto settings = OverlayController::appSettings(); 12 | settings->beginGroup( getSettingsName() ); 13 | auto value = settings->value( "heightOffset", m_heightOffset ); 14 | settings->endGroup(); 15 | if ( value.isValid() && !value.isNull() ) 16 | { 17 | m_heightOffset = value.toFloat(); 18 | emit heightOffsetChanged( m_heightOffset ); 19 | } 20 | 21 | reloadPttConfig(); 22 | } 23 | 24 | void AccessibilityTabController::initStage2( OverlayController* var_parent, 25 | QQuickWindow* var_widget ) 26 | { 27 | this->parent = var_parent; 28 | this->widget = var_widget; 29 | } 30 | 31 | void AccessibilityTabController::setTrackingUniverse( int value ) 32 | { 33 | if ( m_trackingUniverse != value ) 34 | { 35 | reset(); 36 | m_trackingUniverse = value; 37 | } 38 | } 39 | 40 | float AccessibilityTabController::heightOffset() const 41 | { 42 | return m_heightOffset; 43 | } 44 | 45 | void AccessibilityTabController::setHeightOffset( float value, bool notify ) 46 | { 47 | if ( std::abs( m_heightOffset - value ) > 0.001 ) 48 | { 49 | modHeightOffset( value - m_heightOffset, notify ); 50 | } 51 | } 52 | 53 | void AccessibilityTabController::modHeightOffset( float value, bool notify ) 54 | { 55 | parent->AddOffsetToUniverseCenter( 56 | ( vr::TrackingUniverseOrigin ) m_trackingUniverse, 1, -value, false ); 57 | m_heightOffset += value; 58 | auto settings = OverlayController::appSettings(); 59 | settings->beginGroup( getSettingsName() ); 60 | settings->setValue( "heightOffset", m_heightOffset ); 61 | settings->endGroup(); 62 | settings->sync(); 63 | if ( notify ) 64 | { 65 | emit heightOffsetChanged( m_heightOffset ); 66 | } 67 | } 68 | 69 | void AccessibilityTabController::onPttStart() 70 | { 71 | m_toggleHeightOffset = m_heightOffset; 72 | parent->AddOffsetToUniverseCenter( 73 | ( vr::TrackingUniverseOrigin ) m_trackingUniverse, 74 | 1, 75 | m_toggleHeightOffset, 76 | false ); 77 | } 78 | 79 | void AccessibilityTabController::onPttStop() 80 | { 81 | parent->AddOffsetToUniverseCenter( 82 | ( vr::TrackingUniverseOrigin ) m_trackingUniverse, 83 | 1, 84 | -m_toggleHeightOffset, 85 | false ); 86 | } 87 | 88 | void AccessibilityTabController::onPttDisabled() 89 | { 90 | if ( pttActive() ) 91 | { 92 | stopPtt(); 93 | } 94 | m_toggleHeightOffset = 0; 95 | } 96 | 97 | void AccessibilityTabController::reset() 98 | { 99 | std::lock_guard lock( eventLoopMutex ); 100 | vr::VRChaperoneSetup()->RevertWorkingCopy(); 101 | parent->AddOffsetToUniverseCenter( 102 | ( vr::TrackingUniverseOrigin ) m_trackingUniverse, 103 | 1, 104 | m_heightOffset, 105 | false, 106 | false ); 107 | vr::VRChaperoneSetup()->CommitWorkingCopy( vr::EChaperoneConfigFile_Live ); 108 | m_heightOffset = 0.0f; 109 | emit heightOffsetChanged( m_heightOffset ); 110 | } 111 | 112 | void AccessibilityTabController::eventLoopTick( 113 | vr::ETrackingUniverseOrigin universe ) 114 | { 115 | if ( !eventLoopMutex.try_lock() ) 116 | { 117 | return; 118 | } 119 | if ( settingsUpdateCounter >= 50 ) 120 | { 121 | setTrackingUniverse( ( int ) universe ); 122 | settingsUpdateCounter = 0; 123 | } 124 | else 125 | { 126 | settingsUpdateCounter++; 127 | } 128 | checkPttStatus(); 129 | eventLoopMutex.unlock(); 130 | } 131 | 132 | } // namespace advsettings 133 | -------------------------------------------------------------------------------- /src/tabcontrollers/AccessibilityTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "PttController.h" 5 | 6 | class QQuickWindow; 7 | // application namespace 8 | namespace advsettings 9 | { 10 | // forward declaration 11 | class OverlayController; 12 | 13 | class AccessibilityTabController : public PttController 14 | { 15 | Q_OBJECT 16 | Q_PROPERTY( float heightOffset READ heightOffset WRITE setHeightOffset 17 | NOTIFY heightOffsetChanged ) 18 | 19 | private: 20 | OverlayController* parent; 21 | QQuickWindow* widget; 22 | 23 | int m_trackingUniverse = ( int ) vr::TrackingUniverseStanding; 24 | float m_heightOffset = 0.0f; 25 | float m_toggleHeightOffset = 0.0f; 26 | 27 | unsigned settingsUpdateCounter = 0; 28 | 29 | QString getSettingsName() override 30 | { 31 | return "accessibilitySettings"; 32 | } 33 | void onPttStart() override; 34 | void onPttStop() override; 35 | void onPttDisabled() override; 36 | 37 | public: 38 | void initStage1(); 39 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 40 | void eventLoopTick( vr::ETrackingUniverseOrigin universe ); 41 | 42 | float heightOffset() const; 43 | 44 | public slots: 45 | void setTrackingUniverse( int value ); 46 | void setHeightOffset( float value, bool notify = true ); 47 | void modHeightOffset( float value, bool notify = true ); 48 | void reset(); 49 | 50 | signals: 51 | void heightOffsetChanged( float value ); 52 | }; 53 | 54 | } // namespace advsettings 55 | -------------------------------------------------------------------------------- /src/tabcontrollers/AudioManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | // application namespace 7 | namespace advsettings 8 | { 9 | class AudioTabController; 10 | 11 | class AudioManager 12 | { 13 | public: 14 | virtual ~AudioManager(){}; 15 | 16 | virtual void init( AudioTabController* controller ) = 0; 17 | 18 | virtual void setPlaybackDevice( const std::string& id, bool notify = true ) 19 | = 0; 20 | virtual std::string getPlaybackDevName() = 0; 21 | virtual std::string getPlaybackDevId() = 0; 22 | 23 | virtual void setMirrorDevice( const std::string& id, bool notify = true ) 24 | = 0; 25 | virtual bool isMirrorValid() = 0; 26 | virtual std::string getMirrorDevName() = 0; 27 | virtual std::string getMirrorDevId() = 0; 28 | virtual float getMirrorVolume() = 0; 29 | virtual bool setMirrorVolume( float value ) = 0; 30 | virtual bool getMirrorMuted() = 0; 31 | virtual bool setMirrorMuted( bool value ) = 0; 32 | 33 | virtual void setMicDevice( const std::string& id, bool notify = true ) = 0; 34 | virtual bool isMicValid() = 0; 35 | virtual std::string getMicDevName() = 0; 36 | virtual std::string getMicDevId() = 0; 37 | virtual float getMicVolume() = 0; 38 | virtual bool setMicVolume( float value ) = 0; 39 | virtual bool getMicMuted() = 0; 40 | virtual bool setMicMuted( bool value ) = 0; 41 | 42 | virtual std::vector> 43 | getRecordingDevices() = 0; 44 | virtual std::vector> 45 | getPlaybackDevices() = 0; 46 | }; 47 | 48 | } // namespace advsettings 49 | -------------------------------------------------------------------------------- /src/tabcontrollers/AudioTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include "AudioManager.h" 5 | #include "PttController.h" 6 | #include 7 | 8 | class QQuickWindow; 9 | // application namespace 10 | namespace advsettings 11 | { 12 | // forward declaration 13 | class OverlayController; 14 | 15 | struct AudioProfile 16 | { 17 | std::string profileName; 18 | std::string playbackName; 19 | std::string mirrorName; 20 | std::string micName; 21 | float mirrorVol = 0.0; 22 | float micVol = 0.0; 23 | bool micMute = false; 24 | bool mirrorMute = false; 25 | bool defaultProfile = false; 26 | }; 27 | 28 | class AudioTabController : public PttController 29 | { 30 | Q_OBJECT 31 | Q_PROPERTY( int playbackDeviceIndex READ playbackDeviceIndex WRITE 32 | setPlaybackDeviceIndex NOTIFY playbackDeviceIndexChanged ) 33 | Q_PROPERTY( int mirrorDeviceIndex READ mirrorDeviceIndex WRITE 34 | setMirrorDeviceIndex NOTIFY mirrorDeviceIndexChanged ) 35 | Q_PROPERTY( float mirrorVolume READ mirrorVolume WRITE setMirrorVolume 36 | NOTIFY mirrorVolumeChanged ) 37 | Q_PROPERTY( bool mirrorMuted READ mirrorMuted WRITE setMirrorMuted NOTIFY 38 | mirrorMutedChanged ) 39 | Q_PROPERTY( int micDeviceIndex READ micDeviceIndex WRITE setMicDeviceIndex 40 | NOTIFY micDeviceIndexChanged ) 41 | Q_PROPERTY( float micVolume READ micVolume WRITE setMicVolume NOTIFY 42 | micVolumeChanged ) 43 | Q_PROPERTY( 44 | bool micMuted READ micMuted WRITE setMicMuted NOTIFY micMutedChanged ) 45 | Q_PROPERTY( bool micProximitySensorCanMute READ micProximitySensorCanMute 46 | WRITE setMicProximitySensorCanMute NOTIFY 47 | micProximitySensorCanMuteChanged ) 48 | Q_PROPERTY( bool micReversePtt READ micReversePtt WRITE setMicReversePtt 49 | NOTIFY micReversePttChanged ) 50 | Q_PROPERTY( bool audioProfileDefault READ audioProfileDefault WRITE 51 | setAudioProfileDefault NOTIFY audioProfileDefaultChanged ) 52 | 53 | private: 54 | OverlayController* parent; 55 | QQuickWindow* widget; 56 | 57 | vr::VROverlayHandle_t m_ulNotificationOverlayHandle 58 | = vr::k_ulOverlayHandleInvalid; 59 | 60 | int m_playbackDeviceIndex = -1; 61 | 62 | int m_mirrorDeviceIndex = -1; 63 | float m_mirrorVolume = 1.0; 64 | bool m_mirrorMuted = false; 65 | 66 | int m_recordingDeviceIndex = -1; 67 | float m_micVolume = 1.0; 68 | bool m_micMuted = false; 69 | bool m_micProximitySensorCanMute = false; 70 | bool m_micReversePtt = false; 71 | bool m_isDefaultAudioProfile = false; 72 | std::string m_defaultProfileName; 73 | 74 | unsigned settingsUpdateCounter = 0; 75 | 76 | std::unique_ptr audioManager; 77 | std::vector> m_recordingDevices; 78 | std::vector> m_playbackDevices; 79 | std::string lastMirrorDevId; 80 | 81 | QString getSettingsName() override 82 | { 83 | return "audioSettings"; 84 | } 85 | void onPttStart() override; 86 | void onPttStop() override; 87 | void onPttEnabled() override; 88 | void onPttDisabled() override; 89 | bool pttChangeValid() override; 90 | virtual vr::VROverlayHandle_t getNotificationOverlayHandle() override 91 | { 92 | return m_ulNotificationOverlayHandle; 93 | } 94 | 95 | void findPlaybackDeviceIndex( std::string id, bool notify = true ); 96 | void findMirrorDeviceIndex( std::string id, bool notify = true ); 97 | void findMicDeviceIndex( std::string id, bool notify = true ); 98 | 99 | int getPlaybackIndex( std::string str ); 100 | int getRecordingIndex( std::string str ); 101 | int getMirrorIndex( std::string str ); 102 | 103 | void removeDefaultProfile( QString name ); 104 | 105 | std::vector audioProfiles; 106 | 107 | public: 108 | void initStage1(); 109 | void initStage2( OverlayController* var_parent, QQuickWindow* var_widget ); 110 | 111 | void reloadAudioSettings(); 112 | void saveAudioSettings(); 113 | 114 | void eventLoopTick(); 115 | 116 | int playbackDeviceIndex() const; 117 | 118 | int mirrorDeviceIndex() const; 119 | float mirrorVolume() const; 120 | bool mirrorMuted() const; 121 | 122 | int micDeviceIndex() const; 123 | float micVolume() const; 124 | bool micMuted() const; 125 | bool micProximitySensorCanMute() const; 126 | bool micReversePtt() const; 127 | bool audioProfileDefault() const; 128 | 129 | void reloadAudioProfiles(); 130 | void saveAudioProfiles(); 131 | Q_INVOKABLE void applyDefaultProfile(); 132 | 133 | Q_INVOKABLE int getPlaybackDeviceCount(); 134 | Q_INVOKABLE QString getPlaybackDeviceName( int index ); 135 | 136 | Q_INVOKABLE int getRecordingDeviceCount(); 137 | Q_INVOKABLE QString getRecordingDeviceName( int index ); 138 | 139 | Q_INVOKABLE unsigned getAudioProfileCount(); 140 | Q_INVOKABLE QString getAudioProfileName( unsigned index ); 141 | 142 | void onNewRecordingDevice(); 143 | void onNewPlaybackDevice(); 144 | void onNewMirrorDevice(); 145 | void onDeviceStateChanged(); 146 | 147 | public slots: 148 | void setMirrorVolume( float value, bool notify = true ); 149 | void setMirrorMuted( bool value, bool notify = true ); 150 | 151 | void setMicVolume( float value, bool notify = true ); 152 | void setMicMuted( bool value, bool notify = true ); 153 | void setMicProximitySensorCanMute( bool value, bool notify = true ); 154 | void setMicReversePtt( bool value, bool notify = true ); 155 | 156 | void setPlaybackDeviceIndex( int value, bool notify = true ); 157 | void setMirrorDeviceIndex( int value, bool notify = true ); 158 | void setMicDeviceIndex( int value, bool notify = true ); 159 | 160 | void addAudioProfile( QString name ); 161 | void applyAudioProfile( unsigned index ); 162 | void deleteAudioProfile( unsigned index ); 163 | 164 | void setAudioProfileDefault( bool value, bool notify = true ); 165 | 166 | signals: 167 | void playbackDeviceIndexChanged( int index ); 168 | 169 | void mirrorDeviceIndexChanged( int index ); 170 | void mirrorVolumeChanged( float value ); 171 | void mirrorMutedChanged( bool value ); 172 | 173 | void micDeviceIndexChanged( int index ); 174 | void micVolumeChanged( float value ); 175 | void micMutedChanged( bool value ); 176 | void micProximitySensorCanMuteChanged( bool value ); 177 | void micReversePttChanged( bool value ); 178 | 179 | void playbackDeviceListChanged(); 180 | void recordingDeviceListChanged(); 181 | 182 | void audioProfilesUpdated(); 183 | void audioProfileAdded(); 184 | void audioProfileDefaultChanged( bool value ); 185 | }; 186 | } // namespace advsettings 187 | -------------------------------------------------------------------------------- /src/tabcontrollers/FixFloorTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include 6 | 7 | class QQuickWindow; 8 | // application namespace 9 | namespace advsettings 10 | { 11 | // forward declaration 12 | class OverlayController; 13 | 14 | class FixFloorTabController : public QObject 15 | { 16 | Q_OBJECT 17 | Q_PROPERTY( 18 | bool canUndo READ canUndo WRITE setCanUndo NOTIFY canUndoChanged ) 19 | 20 | private: 21 | OverlayController* parent; 22 | QQuickWindow* widget; 23 | 24 | float controllerUpOffsetCorrection 25 | = 0.062f; // Controller touchpad facing upwards 26 | float controllerDownOffsetCorrection 27 | = 0.006f; // Controller touchpad facing downwards 28 | 29 | int state 30 | = 0; // 0 .. idle, 1 .. floor fix in progress, 2 .. recenter in progress 31 | vr::TrackedDeviceIndex_t referenceController 32 | = vr::k_unTrackedDeviceIndexInvalid; 33 | unsigned measurementCount = 0; 34 | double tempOffsetX = 0.0; 35 | double tempOffsetY = 0.0; 36 | double tempOffsetZ = 0.0; 37 | double tempRoll = 0.0; 38 | float floorOffsetX = 0.0f; 39 | float floorOffsetY = 0.0f; 40 | float floorOffsetZ = 0.0f; 41 | QString statusMessage = ""; 42 | float statusMessageTimeout = 0.0f; 43 | bool m_canUndo = false; 44 | 45 | public: 46 | void initStage1(); 47 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 48 | 49 | void eventLoopTick( vr::TrackedDevicePose_t* devicePoses ); 50 | 51 | Q_INVOKABLE QString currentStatusMessage(); 52 | Q_INVOKABLE float currentStatusMessageTimeout(); 53 | 54 | bool canUndo() const; 55 | 56 | public slots: 57 | void fixFloorClicked(); 58 | void recenterClicked(); 59 | void undoFixFloorClicked(); 60 | 61 | void setCanUndo( bool value, bool notify = true ); 62 | 63 | signals: 64 | void statusMessageSignal(); 65 | void measureStartSignal(); 66 | void measureEndSignal(); 67 | void canUndoChanged( bool value ); 68 | }; 69 | 70 | } // namespace advsettings 71 | -------------------------------------------------------------------------------- /src/tabcontrollers/KeyboardInput.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | // application namespace 7 | namespace advsettings 8 | { 9 | class AudioTabController; 10 | 11 | class KeyboardInput 12 | { 13 | public: 14 | virtual ~KeyboardInput(){}; 15 | 16 | virtual void sendKeyboardInput( QString input ) = 0; 17 | virtual void sendKeyboardEnter() = 0; 18 | virtual void sendKeyboardBackspace( int count ) = 0; 19 | virtual void sendKeyboardAltTab() = 0; 20 | }; 21 | 22 | } // namespace advsettings 23 | -------------------------------------------------------------------------------- /src/tabcontrollers/MoveCenterTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class QQuickWindow; 9 | // application namespace 10 | namespace advsettings 11 | { 12 | // forward declaration 13 | class OverlayController; 14 | 15 | class MoveCenterTabController : public QObject 16 | { 17 | Q_OBJECT 18 | Q_PROPERTY( int trackingUniverse READ trackingUniverse WRITE 19 | setTrackingUniverse NOTIFY trackingUniverseChanged ) 20 | Q_PROPERTY( 21 | float offsetX READ offsetX WRITE setOffsetX NOTIFY offsetXChanged ) 22 | Q_PROPERTY( 23 | float offsetY READ offsetY WRITE setOffsetY NOTIFY offsetYChanged ) 24 | Q_PROPERTY( 25 | float offsetZ READ offsetZ WRITE setOffsetZ NOTIFY offsetZChanged ) 26 | Q_PROPERTY( 27 | int rotation READ rotation WRITE setRotation NOTIFY rotationChanged ) 28 | Q_PROPERTY( bool adjustChaperone READ adjustChaperone WRITE 29 | setAdjustChaperone NOTIFY adjustChaperoneChanged ) 30 | Q_PROPERTY( bool moveShortcutRight READ moveShortcutRight WRITE 31 | setMoveShortcutRight NOTIFY moveShortcutRightChanged ) 32 | Q_PROPERTY( bool moveShortcutLeft READ moveShortcutLeft WRITE 33 | setMoveShortcutLeft NOTIFY moveShortcutLeftChanged ) 34 | Q_PROPERTY( bool requireDoubleClick READ requireDoubleClick WRITE 35 | setRequireDoubleClick NOTIFY requireDoubleClickChanged ) 36 | Q_PROPERTY( bool lockXToggle READ lockXToggle WRITE setLockX NOTIFY 37 | requireLockXChanged ) 38 | Q_PROPERTY( bool lockYToggle READ lockYToggle WRITE setLockY NOTIFY 39 | requireLockYChanged ) 40 | Q_PROPERTY( bool lockZToggle READ lockZToggle WRITE setLockZ NOTIFY 41 | requireLockZChanged ) 42 | 43 | private: 44 | OverlayController* parent; 45 | QQuickWindow* widget; 46 | 47 | int m_trackingUniverse = ( int ) vr::TrackingUniverseStanding; 48 | float m_offsetX = 0.0f; 49 | float m_offsetY = 0.0f; 50 | float m_offsetZ = 0.0f; 51 | int m_rotation = 0; 52 | int m_rotationOld = 0; 53 | bool m_adjustChaperone = true; 54 | bool m_moveShortcutRightPressed = false; 55 | bool m_moveShortcutLeftPressed = false; 56 | vr::ETrackedControllerRole m_activeMoveController; 57 | float m_lastControllerPosition[3]; 58 | bool m_moveShortcutRightEnabled = false; 59 | bool m_moveShortcutLeftEnabled = false; 60 | bool m_requireDoubleClick = false; 61 | bool m_lockXToggle = false; 62 | bool m_lockYToggle = false; 63 | bool m_lockZToggle = false; 64 | std::chrono::system_clock::time_point lastMoveButtonClick[2]; 65 | 66 | unsigned settingsUpdateCounter = 0; 67 | 68 | vr::ETrackedControllerRole getMoveShortcutHand(); 69 | 70 | public: 71 | void initStage1(); 72 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 73 | 74 | void eventLoopTick( vr::ETrackingUniverseOrigin universe, 75 | vr::TrackedDevicePose_t* devicePoses ); 76 | 77 | float offsetX() const; 78 | float offsetY() const; 79 | float offsetZ() const; 80 | int rotation() const; 81 | bool adjustChaperone() const; 82 | bool moveShortcutRight() const; 83 | bool moveShortcutLeft() const; 84 | bool requireDoubleClick() const; 85 | bool lockXToggle() const; 86 | bool lockYToggle() const; 87 | bool lockZToggle() const; 88 | 89 | public slots: 90 | int trackingUniverse() const; 91 | void setTrackingUniverse( int value, bool notify = true ); 92 | 93 | void setOffsetX( float value, bool notify = true ); 94 | void setOffsetY( float value, bool notify = true ); 95 | void setOffsetZ( float value, bool notify = true ); 96 | 97 | void setRotation( int value, bool notify = true ); 98 | 99 | void setAdjustChaperone( bool value, bool notify = true ); 100 | 101 | void setMoveShortcutRight( bool value, bool notify = true ); 102 | void setMoveShortcutLeft( bool value, bool notify = true ); 103 | void setRequireDoubleClick( bool value, bool notify = true ); 104 | 105 | void modOffsetX( float value, bool notify = true ); 106 | void modOffsetY( float value, bool notify = true ); 107 | void modOffsetZ( float value, bool notify = true ); 108 | 109 | void setLockX( bool value, bool notify = true ); 110 | void setLockY( bool value, bool notify = true ); 111 | void setLockZ( bool value, bool notify = true ); 112 | 113 | void applyRotation(); 114 | void reset(); 115 | 116 | signals: 117 | void trackingUniverseChanged( int value ); 118 | void offsetXChanged( float value ); 119 | void offsetYChanged( float value ); 120 | void offsetZChanged( float value ); 121 | void rotationChanged( int value ); 122 | void adjustChaperoneChanged( bool value ); 123 | void moveShortcutRightChanged( bool value ); 124 | void moveShortcutLeftChanged( bool value ); 125 | void requireDoubleClickChanged( bool value ); 126 | void requireLockXChanged( bool value ); 127 | void requireLockYChanged( bool value ); 128 | void requireLockZChanged( bool value ); 129 | }; 130 | 131 | } // namespace advsettings 132 | -------------------------------------------------------------------------------- /src/tabcontrollers/PttController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class QQuickWindow; 12 | // application namespace 13 | namespace advsettings 14 | { 15 | // forward declaration 16 | class OverlayController; 17 | 18 | enum TouchPadArea 19 | { 20 | PAD_AREA_LEFT = ( 1 << 0 ), 21 | PAD_AREA_TOP = ( 1 << 1 ), 22 | PAD_AREA_RIGHT = ( 1 << 2 ), 23 | PAD_AREA_BOTTOM = ( 1 << 3 ), 24 | }; 25 | 26 | struct PttControllerConfig 27 | { 28 | QVariantList digitalButtons; 29 | uint64_t digitalButtonMask = 0; 30 | unsigned triggerMode = 0; // 0 .. disabled, 1 .. enabled 31 | unsigned touchpadMode 32 | = 0; // 0 .. disabled, 1 .. only touch, 2 .. only press, 3 .. both 33 | unsigned touchpadAreas = 0; 34 | }; 35 | 36 | struct PttProfile 37 | { 38 | std::string profileName; 39 | 40 | bool showNotification = false; 41 | bool leftControllerEnabled = false; 42 | bool rightControllerEnabled = false; 43 | PttControllerConfig controllerConfigs[2]; 44 | }; 45 | 46 | class PttController : public QObject 47 | { 48 | Q_OBJECT 49 | Q_PROPERTY( bool pttEnabled READ pttEnabled WRITE setPttEnabled NOTIFY 50 | pttEnabledChanged ) 51 | Q_PROPERTY( bool pttActive READ pttActive NOTIFY pttActiveChanged ) 52 | Q_PROPERTY( bool pttShowNotification READ pttShowNotification WRITE 53 | setPttShowNotification NOTIFY pttShowNotificationChanged ) 54 | Q_PROPERTY( 55 | bool pttLeftControllerEnabled READ pttLeftControllerEnabled WRITE 56 | setPttLeftControllerEnabled NOTIFY pttLeftControllerEnabledChanged ) 57 | Q_PROPERTY( bool pttRightControllerEnabled READ pttRightControllerEnabled 58 | WRITE setPttRightControllerEnabled NOTIFY 59 | pttRightControllerEnabledChanged ) 60 | 61 | protected: 62 | bool m_pttEnabled = false; 63 | bool m_pttActive = false; 64 | bool m_pttShowNotification = false; 65 | bool m_pttLeftControllerEnabled = false; 66 | bool m_pttRightControllerEnabled = false; 67 | PttControllerConfig m_pttControllerConfigs[2]; 68 | 69 | std::vector pttProfiles; 70 | 71 | protected: 72 | void checkPttStatus(); 73 | virtual QString getSettingsName() = 0; 74 | virtual void onPttStart(){}; 75 | virtual void onPttStop(){}; 76 | virtual void onPttEnabled(){}; 77 | virtual void onPttDisabled(){}; 78 | virtual bool pttChangeValid() 79 | { 80 | return true; 81 | } 82 | virtual vr::VROverlayHandle_t getNotificationOverlayHandle() 83 | { 84 | return vr::k_ulOverlayHandleInvalid; 85 | } 86 | std::recursive_mutex eventLoopMutex; 87 | 88 | public: 89 | bool pttEnabled() const; 90 | bool pttActive() const; 91 | bool pttShowNotification() const; 92 | bool pttLeftControllerEnabled() const; 93 | bool pttRightControllerEnabled() const; 94 | 95 | void startPtt(); 96 | void stopPtt(); 97 | 98 | void reloadPttProfiles(); 99 | void reloadPttConfig(); 100 | void savePttProfiles(); 101 | void savePttConfig(); 102 | 103 | Q_INVOKABLE QVariantList pttDigitalButtons( unsigned controller ); 104 | Q_INVOKABLE unsigned long pttDigitalButtonMask( unsigned controller ); 105 | Q_INVOKABLE unsigned pttTouchpadMode( unsigned controller ); 106 | Q_INVOKABLE unsigned pttTriggerMode( unsigned controller ); 107 | Q_INVOKABLE unsigned pttTouchpadArea( unsigned controller ); 108 | 109 | Q_INVOKABLE unsigned getPttProfileCount(); 110 | Q_INVOKABLE QString getPttProfileName( unsigned index ); 111 | 112 | public slots: 113 | void setPttEnabled( bool value, bool notify = true, bool save = true ); 114 | void setPttShowNotification( bool value, 115 | bool notify = true, 116 | bool save = true ); 117 | void setPttLeftControllerEnabled( bool value, 118 | bool notify = true, 119 | bool save = true ); 120 | void setPttRightControllerEnabled( bool value, 121 | bool notify = true, 122 | bool save = true ); 123 | 124 | void setPttControllerConfig( unsigned controller, 125 | QVariantList buttons, 126 | unsigned triggerMode, 127 | unsigned padMode, 128 | unsigned padAreas ); 129 | 130 | void addPttProfile( QString name ); 131 | void applyPttProfile( unsigned index ); 132 | void deletePttProfile( unsigned index ); 133 | 134 | signals: 135 | void pttEnabledChanged( bool value ); 136 | void pttActiveChanged( bool value ); 137 | void pttShowNotificationChanged( bool value ); 138 | void pttLeftControllerEnabledChanged( bool value ); 139 | void pttRightControllerEnabledChanged( bool value ); 140 | 141 | void pttProfilesUpdated(); 142 | void pttProfileAdded(); 143 | }; 144 | 145 | } // namespace advsettings 146 | -------------------------------------------------------------------------------- /src/tabcontrollers/ReviveTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | 6 | class QQuickWindow; 7 | // application namespace 8 | namespace advsettings 9 | { 10 | // forward declaration 11 | class OverlayController; 12 | 13 | struct ReviveControllerProfile 14 | { 15 | std::string profileName; 16 | int gripButtonMode; 17 | bool triggerAsGrip; 18 | float thumbDeadzone; 19 | float thumbRange; 20 | float touchPitch; 21 | float touchYaw; 22 | float touchRoll; 23 | float touchX; 24 | float touchY; 25 | float touchZ; 26 | }; 27 | 28 | class ReviveTabController : public QObject 29 | { 30 | Q_OBJECT 31 | Q_PROPERTY( int isOverlayInstalled READ isOverlayInstalled NOTIFY 32 | isOverlayInstalledChanged ) 33 | Q_PROPERTY( int gripButtonMode READ gripButtonMode WRITE setGripButtonMode 34 | NOTIFY gripButtonModeChanged ) 35 | Q_PROPERTY( int triggerAsGrip READ triggerAsGrip WRITE setTriggerAsGrip 36 | NOTIFY triggerAsGripChanged ) 37 | Q_PROPERTY( bool pixelsPerDisplayPixelOverrideEnabled READ 38 | isPixelsPerDisplayPixelOverrideEnabled WRITE 39 | setPixelsPerDisplayPixelOverrideEnabled NOTIFY 40 | pixelsPerDisplayPixelOverrideEnabledChanged ) 41 | Q_PROPERTY( float toggleDelay READ toggleDelay WRITE setToggleDelay NOTIFY 42 | toggleDelayChanged ) 43 | Q_PROPERTY( 44 | float pixelsPerDisplayPixelOverride READ pixelsPerDisplayPixelOverride 45 | WRITE setPixelsPerDisplayPixelOverride NOTIFY 46 | pixelsPerDisplayPixelOverrideChanged ) 47 | Q_PROPERTY( float thumbDeadzone READ thumbDeadzone WRITE setThumbDeadzone 48 | NOTIFY thumbDeadzoneChanged ) 49 | Q_PROPERTY( float thumbRange READ thumbRange WRITE setThumbRange NOTIFY 50 | thumbRangeChanged ) 51 | Q_PROPERTY( float touchPitch READ touchPitch WRITE setTouchPitch NOTIFY 52 | touchPitchChanged ) 53 | Q_PROPERTY( 54 | float touchYaw READ touchYaw WRITE setTouchYaw NOTIFY touchYawChanged ) 55 | Q_PROPERTY( float touchRoll READ touchRoll WRITE setTouchRoll NOTIFY 56 | touchRollChanged ) 57 | Q_PROPERTY( float touchX READ touchX WRITE setTouchX NOTIFY touchXChanged ) 58 | Q_PROPERTY( float touchY READ touchY WRITE setTouchY NOTIFY touchYChanged ) 59 | Q_PROPERTY( float touchZ READ touchZ WRITE setTouchZ NOTIFY touchZChanged ) 60 | Q_PROPERTY( float piPlayerHeight READ piPlayerHeight WRITE setPiPlayerHeight 61 | NOTIFY piPlayerHeightChanged ) 62 | Q_PROPERTY( float piEyeHeight READ piEyeHeight WRITE setPiEyeHeight NOTIFY 63 | piEyeHeightChanged ) 64 | Q_PROPERTY( QString piUsername READ piUsername WRITE setPiUsername NOTIFY 65 | piUsernameChanged ) 66 | Q_PROPERTY( 67 | QString piName READ piName WRITE setPiName NOTIFY piNameChanged ) 68 | Q_PROPERTY( 69 | int piGender READ piGender WRITE setPiGender NOTIFY piGenderChanged ) 70 | 71 | private: 72 | OverlayController* parent; 73 | QQuickWindow* widget; 74 | 75 | bool m_isOverlayInstalled = false; 76 | int m_gripButtonMode = 0; 77 | float m_toggleDelay = 0.5f; 78 | bool m_triggerAsGrip = false; 79 | bool m_pixelsPerDisplayPixelOverrideEnabled = false; 80 | float m_pixelsPerDisplayPixelOverride = 1.0f; 81 | float m_thumbDeadzone = 0.3f; 82 | float m_thumbRange = 2.0f; 83 | float m_touchPitch = -28.0f; 84 | float m_touchYaw = 0.0f; 85 | float m_touchRoll = -14.0f; 86 | float m_touchX = 0.016f; 87 | float m_touchY = -0.036f; 88 | float m_touchZ = 0.016f; 89 | float m_piPlayerHeight = 1.778f; 90 | float m_piEyeHeight = 1.675f; 91 | QString m_piUsername = ""; 92 | QString m_piName = ""; 93 | int m_piGender = 0; // 0 .. Unknown, 1 .. Male, 2 .. Female 94 | 95 | unsigned settingsUpdateCounter = 0; 96 | 97 | std::vector controllerProfiles; 98 | 99 | public: 100 | void initStage1( bool forceRevivePage ); 101 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 102 | 103 | void eventLoopTick(); 104 | 105 | bool isOverlayInstalled() const; 106 | 107 | int gripButtonMode() const; 108 | bool triggerAsGrip() const; 109 | float toggleDelay() const; 110 | 111 | bool isPixelsPerDisplayPixelOverrideEnabled() const; 112 | float pixelsPerDisplayPixelOverride() const; 113 | 114 | float thumbDeadzone() const; 115 | float thumbRange() const; 116 | 117 | float touchPitch() const; 118 | float touchYaw() const; 119 | float touchRoll() const; 120 | float touchX() const; 121 | float touchY() const; 122 | float touchZ() const; 123 | 124 | float piPlayerHeight() const; 125 | float piEyeHeight() const; 126 | const QString& piUsername() const; 127 | const QString& piName() const; 128 | int piGender() const; // 0 .. Unknown, 1 .. Male, 2 .. Female 129 | 130 | Q_INVOKABLE float getCurrentHMDHeight(); 131 | 132 | void reloadControllerProfiles(); 133 | void saveControllerProfiles(); 134 | 135 | Q_INVOKABLE unsigned getControllerProfileCount(); 136 | Q_INVOKABLE QString getControllerProfileName( unsigned index ); 137 | 138 | public slots: 139 | void setGripButtonMode( int value, bool notify = true ); 140 | void setTriggerAsGrip( bool value, bool notify = true ); 141 | void setToggleDelay( float value, bool notify = true ); 142 | 143 | void setPixelsPerDisplayPixelOverrideEnabled( bool value, 144 | bool notify = true ); 145 | void setPixelsPerDisplayPixelOverride( float value, bool notify = true ); 146 | 147 | void setThumbDeadzone( float value, bool notify = true ); 148 | void setThumbRange( float value, bool notify = true ); 149 | 150 | void setTouchPitch( float value, bool notify = true ); 151 | void setTouchYaw( float value, bool notify = true ); 152 | void setTouchRoll( float value, bool notify = true ); 153 | void setTouchX( float value, bool notify = true ); 154 | void setTouchY( float value, bool notify = true ); 155 | void setTouchZ( float value, bool notify = true ); 156 | 157 | void setPiPlayerHeight( float value, bool notify = true ); 158 | void setPiEyeHeight( float value, bool notify = true ); 159 | void setPiUsername( const QString& value, bool notify = true ); 160 | void setPiName( const QString& value, bool notify = true ); 161 | void setPiGender( int value, 162 | bool notify 163 | = true ); // 0 .. Unknown, 1 .. Male, 2 .. Female 164 | 165 | void addControllerProfile( QString name ); 166 | void applyControllerProfile( unsigned index ); 167 | void deleteControllerProfile( unsigned index ); 168 | 169 | void reset(); 170 | 171 | signals: 172 | void isOverlayInstalledChanged( bool value ); 173 | 174 | void gripButtonModeChanged( int value ); 175 | void triggerAsGripChanged( bool value ); 176 | void toggleDelayChanged( float value ); 177 | 178 | void pixelsPerDisplayPixelOverrideEnabledChanged( bool value ); 179 | void pixelsPerDisplayPixelOverrideChanged( float value ); 180 | 181 | void thumbDeadzoneChanged( float value ); 182 | void thumbRangeChanged( float value ); 183 | 184 | void touchPitchChanged( float value ); 185 | void touchYawChanged( float value ); 186 | void touchRollChanged( float value ); 187 | void touchXChanged( float value ); 188 | void touchYChanged( float value ); 189 | void touchZChanged( float value ); 190 | 191 | void piPlayerHeightChanged( float value ); 192 | void piEyeHeightChanged( float value ); 193 | void piUsernameChanged( const QString& value ); 194 | void piNameChanged( const QString& value ); 195 | void piGenderChanged( int value ); 196 | 197 | void controllerProfilesUpdated(); 198 | }; 199 | 200 | } // namespace advsettings 201 | -------------------------------------------------------------------------------- /src/tabcontrollers/SettingsTabController.cpp: -------------------------------------------------------------------------------- 1 | #include "SettingsTabController.h" 2 | #include 3 | #include "../overlaycontroller.h" 4 | 5 | // application namespace 6 | namespace advsettings 7 | { 8 | void SettingsTabController::initStage1() 9 | { 10 | m_autoStartEnabled = vr::VRApplications()->GetApplicationAutoLaunch( 11 | OverlayController::applicationKey ); 12 | auto settings = OverlayController::appSettings(); 13 | settings->beginGroup( "applicationSettings" ); 14 | auto value = settings->value( "forceRevivePage", m_forceRevivePage ); 15 | settings->endGroup(); 16 | if ( value.isValid() && !value.isNull() ) 17 | { 18 | m_forceRevivePage = value.toBool(); 19 | } 20 | } 21 | 22 | void SettingsTabController::initStage2( OverlayController* var_parent, 23 | QQuickWindow* var_widget ) 24 | { 25 | this->parent = var_parent; 26 | this->widget = var_widget; 27 | } 28 | 29 | void SettingsTabController::eventLoopTick() 30 | { 31 | if ( settingsUpdateCounter >= 50 ) 32 | { 33 | setAutoStartEnabled( vr::VRApplications()->GetApplicationAutoLaunch( 34 | OverlayController::applicationKey ) ); 35 | settingsUpdateCounter = 0; 36 | } 37 | else 38 | { 39 | settingsUpdateCounter++; 40 | } 41 | } 42 | 43 | bool SettingsTabController::autoStartEnabled() const 44 | { 45 | return m_autoStartEnabled; 46 | } 47 | 48 | void SettingsTabController::setAutoStartEnabled( bool value, bool notify ) 49 | { 50 | if ( m_autoStartEnabled != value ) 51 | { 52 | m_autoStartEnabled = value; 53 | auto apperror = vr::VRApplications()->SetApplicationAutoLaunch( 54 | OverlayController::applicationKey, m_autoStartEnabled ); 55 | if ( apperror != vr::VRApplicationError_None ) 56 | { 57 | LOG( ERROR ) << "Could not set auto start: " 58 | << vr::VRApplications() 59 | ->GetApplicationsErrorNameFromEnum( apperror ); 60 | } 61 | if ( notify ) 62 | { 63 | emit autoStartEnabledChanged( m_autoStartEnabled ); 64 | } 65 | } 66 | } 67 | 68 | bool SettingsTabController::forceRevivePage() const 69 | { 70 | return m_forceRevivePage; 71 | } 72 | 73 | void SettingsTabController::setForceRevivePage( bool value, bool notify ) 74 | { 75 | if ( m_forceRevivePage != value ) 76 | { 77 | m_forceRevivePage = value; 78 | auto settings = OverlayController::appSettings(); 79 | settings->beginGroup( "applicationSettings" ); 80 | settings->setValue( "forceRevivePage", m_forceRevivePage ); 81 | settings->endGroup(); 82 | settings->sync(); 83 | if ( notify ) 84 | { 85 | emit forceRevivePageChanged( m_forceRevivePage ); 86 | } 87 | } 88 | } 89 | 90 | } // namespace advsettings 91 | -------------------------------------------------------------------------------- /src/tabcontrollers/SettingsTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | 6 | class QQuickWindow; 7 | // application namespace 8 | namespace advsettings 9 | { 10 | // forward declaration 11 | class OverlayController; 12 | 13 | class SettingsTabController : public QObject 14 | { 15 | Q_OBJECT 16 | Q_PROPERTY( bool autoStartEnabled READ autoStartEnabled WRITE 17 | setAutoStartEnabled NOTIFY autoStartEnabledChanged ) 18 | Q_PROPERTY( bool forceRevivePage READ forceRevivePage WRITE 19 | setForceRevivePage NOTIFY forceRevivePageChanged ) 20 | 21 | private: 22 | OverlayController* parent; 23 | QQuickWindow* widget; 24 | 25 | unsigned settingsUpdateCounter = 0; 26 | 27 | bool m_autoStartEnabled = false; 28 | bool m_forceRevivePage = false; 29 | 30 | public: 31 | void initStage1(); 32 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 33 | 34 | void eventLoopTick(); 35 | 36 | bool autoStartEnabled() const; 37 | bool forceRevivePage() const; 38 | 39 | public slots: 40 | void setAutoStartEnabled( bool value, bool notify = true ); 41 | void setForceRevivePage( bool value, bool notify = true ); 42 | 43 | signals: 44 | void autoStartEnabledChanged( bool value ); 45 | void forceRevivePageChanged( bool value ); 46 | }; 47 | 48 | } // namespace advsettings 49 | -------------------------------------------------------------------------------- /src/tabcontrollers/StatisticsTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include 6 | 7 | class QQuickWindow; 8 | // application namespace 9 | namespace advsettings 10 | { 11 | // forward declaration 12 | class OverlayController; 13 | 14 | class StatisticsTabController : public QObject 15 | { 16 | Q_OBJECT 17 | Q_PROPERTY( float hmdDistanceMoved READ hmdDistanceMoved ) 18 | Q_PROPERTY( float hmdRotations READ hmdRotations ) 19 | Q_PROPERTY( float leftControllerMaxSpeed READ leftControllerMaxSpeed ) 20 | Q_PROPERTY( float rightControllerMaxSpeed READ rightControllerMaxSpeed ) 21 | Q_PROPERTY( int presentedFrames READ presentedFrames ) 22 | Q_PROPERTY( int droppedFrames READ droppedFrames ) 23 | Q_PROPERTY( int reprojectedFrames READ reprojectedFrames ) 24 | Q_PROPERTY( int timedOut READ timedOut ) 25 | Q_PROPERTY( float totalReprojectedRatio READ totalReprojectedRatio ) 26 | 27 | private: 28 | OverlayController* parent; 29 | QQuickWindow* widget; 30 | 31 | bool rotationResetFlag = false; 32 | float rotationOffset = 0.0f; 33 | int rotationDir = 0; 34 | int64_t rotationCounter = 0; 35 | float lastYaw = -1.0f; 36 | unsigned lastPosTimer = 0; 37 | float lastHmdPos[3]; 38 | bool lastHmdPosValid = false; 39 | 40 | float m_hmdRotation = 0.0f; 41 | double m_hmdDistanceMoved = 0.0; 42 | 43 | float m_leftControllerMaxSpeed = 0.0f; 44 | float m_rightControllerMaxSpeed = 0.0f; 45 | 46 | vr::Compositor_CumulativeStats m_cumStats; 47 | unsigned m_presentedFramesOffset = 0; 48 | unsigned m_droppedFramesOffset = 0; 49 | unsigned m_reprojectedFramesOffset = 0; 50 | unsigned m_timedOutOffset = 0; 51 | unsigned m_totalRatioPresentedOffset = 0; 52 | unsigned m_totalRatioReprojectedOffset = 0; 53 | 54 | public: 55 | void initStage1(); 56 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 57 | 58 | void eventLoopTick( vr::TrackedDevicePose_t* devicePoses, 59 | float leftSpeed, 60 | float rightSpeed ); 61 | 62 | float hmdDistanceMoved() const; 63 | float hmdRotations() const; 64 | float rightControllerMaxSpeed() const; 65 | float leftControllerMaxSpeed() const; 66 | 67 | unsigned presentedFrames() const; 68 | unsigned droppedFrames() const; 69 | unsigned reprojectedFrames() const; 70 | unsigned timedOut() const; 71 | float totalReprojectedRatio() const; 72 | 73 | public slots: 74 | void statsDistanceResetClicked(); 75 | void statsRotationResetClicked(); 76 | void statsLeftControllerSpeedResetClicked(); 77 | void statsRightControllerSpeedResetClicked(); 78 | void presentedFramesResetClicked(); 79 | void droppedFramesResetClicked(); 80 | void reprojectedFramesResetClicked(); 81 | void timedOutResetClicked(); 82 | void totalRatioResetClicked(); 83 | }; 84 | 85 | } // namespace advsettings 86 | -------------------------------------------------------------------------------- /src/tabcontrollers/SteamVRTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | 6 | class QQuickWindow; 7 | // application namespace 8 | namespace advsettings 9 | { 10 | // forward declaration 11 | class OverlayController; 12 | 13 | struct SteamVRProfile 14 | { 15 | std::string profileName; 16 | 17 | bool includesSupersampling = false; 18 | float supersampling = 1.0f; 19 | 20 | bool includesSupersampleFiltering = false; 21 | bool supersampleFiltering = false; 22 | 23 | bool includesReprojectionSettings = false; 24 | bool asynchronousReprojection = true; 25 | bool interleavedReprojection = true; 26 | bool alwaysOnReprojection = true; 27 | }; 28 | 29 | class SteamVRTabController : public QObject 30 | { 31 | Q_OBJECT 32 | Q_PROPERTY( float superSampling READ superSampling WRITE setSuperSampling 33 | NOTIFY superSamplingChanged ) 34 | Q_PROPERTY( 35 | float compositorSuperSampling READ compositorSuperSampling WRITE 36 | setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged ) 37 | Q_PROPERTY( 38 | bool allowInterleavedReprojection READ allowInterleavedReprojection 39 | WRITE setAllowInterleavedReprojection NOTIFY 40 | allowInterleavedReprojectionChanged ) 41 | Q_PROPERTY( 42 | bool allowAsyncReprojection READ allowAsyncReprojection WRITE 43 | setAllowAsyncReprojection NOTIFY allowAsyncReprojectionChanged ) 44 | Q_PROPERTY( bool forceReprojection READ forceReprojection WRITE 45 | setForceReprojection NOTIFY forceReprojectionChanged ) 46 | Q_PROPERTY( bool allowSupersampleFiltering READ allowSupersampleFiltering 47 | WRITE setAllowSupersampleFiltering NOTIFY 48 | allowSupersampleFilteringChanged ) 49 | 50 | private: 51 | OverlayController* parent; 52 | QQuickWindow* widget; 53 | 54 | float m_superSampling = 1.0; 55 | float m_compositorSuperSampling = 1.0; 56 | bool m_allowInterleavedReprojection = true; 57 | bool m_allowAsyncReprojection = true; 58 | bool m_forceReprojection = false; 59 | bool m_allowSupersampleFiltering = true; 60 | 61 | std::vector steamvrProfiles; 62 | 63 | unsigned settingsUpdateCounter = 0; 64 | 65 | public: 66 | void initStage1(); 67 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 68 | 69 | void eventLoopTick(); 70 | 71 | float superSampling() const; 72 | float compositorSuperSampling() const; 73 | bool allowInterleavedReprojection() const; 74 | bool allowAsyncReprojection() const; 75 | bool forceReprojection() const; 76 | bool allowSupersampleFiltering() const; 77 | 78 | void reloadSteamVRProfiles(); 79 | void saveSteamVRProfiles(); 80 | 81 | Q_INVOKABLE unsigned getSteamVRProfileCount(); 82 | Q_INVOKABLE QString getSteamVRProfileName( unsigned index ); 83 | 84 | public slots: 85 | void setSuperSampling( float value, bool notify = true ); 86 | void setCompositorSuperSampling( float value, bool notify = true ); 87 | void setAllowInterleavedReprojection( bool value, bool notify = true ); 88 | void setAllowAsyncReprojection( bool value, bool notify = true ); 89 | void setForceReprojection( bool value, bool notify = true ); 90 | void setAllowSupersampleFiltering( bool value, bool notify = true ); 91 | 92 | void addSteamVRProfile( QString name, 93 | bool includeSupersampling, 94 | bool includeSupersampleFiltering, 95 | bool includeReprojectionSettings ); 96 | void applySteamVRProfile( unsigned index ); 97 | void deleteSteamVRProfile( unsigned index ); 98 | 99 | void reset(); 100 | void restartSteamVR(); 101 | 102 | signals: 103 | void superSamplingChanged( float value ); 104 | void compositorSuperSamplingChanged( float value ); 105 | void allowInterleavedReprojectionChanged( bool value ); 106 | void allowAsyncReprojectionChanged( bool value ); 107 | void forceReprojectionChanged( bool value ); 108 | void allowSupersampleFilteringChanged( bool value ); 109 | 110 | void steamVRProfilesUpdated(); 111 | }; 112 | 113 | } // namespace advsettings 114 | -------------------------------------------------------------------------------- /src/tabcontrollers/UtilitiesTabController.h: -------------------------------------------------------------------------------- 1 | 2 | #pragma once 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "KeyboardInput.h" 9 | 10 | class QQuickWindow; 11 | // application namespace 12 | namespace advsettings 13 | { 14 | // forward declaration 15 | class OverlayController; 16 | 17 | class UtilitiesTabController : public QObject 18 | { 19 | Q_OBJECT 20 | Q_PROPERTY( bool alarmEnabled READ alarmEnabled WRITE setAlarmEnabled NOTIFY 21 | alarmEnabledChanged ) 22 | Q_PROPERTY( bool alarmIsModal READ alarmIsModal WRITE setAlarmIsModal NOTIFY 23 | alarmIsModalChanged ) 24 | Q_PROPERTY( int alarmTimeHour READ alarmTimeHour WRITE setAlarmTimeHour 25 | NOTIFY alarmTimeHourChanged ) 26 | Q_PROPERTY( int alarmTimeMinute READ alarmTimeMinute WRITE 27 | setAlarmTimeMinute NOTIFY alarmTimeMinuteChanged ) 28 | Q_PROPERTY( 29 | bool steamDesktopOverlayAvailable READ steamDesktopOverlayAvailable 30 | NOTIFY steamDesktopOverlayAvailableChanged ) 31 | Q_PROPERTY( 32 | float steamDesktopOverlayWidth READ steamDesktopOverlayWidth WRITE 33 | setSteamDesktopOverlayWidth NOTIFY steamDesktopOverlayWidthChanged ) 34 | 35 | private: 36 | OverlayController* parent; 37 | QQuickWindow* widget; 38 | 39 | unsigned settingsUpdateCounter = 0; 40 | 41 | bool m_alarmEnabled = false; 42 | bool m_alarmIsModal = true; 43 | QTime m_alarmTime; 44 | QTime m_alarmLastCheckTime; 45 | bool m_steamDesktopOverlayAvailable = false; 46 | float m_steamDesktopOverlayWidth = 4.0f; 47 | vr::VROverlayHandle_t 48 | m_batteryOverlayHandles[vr::k_unMaxTrackedDeviceCount]; 49 | int m_batteryState[vr::k_unMaxTrackedDeviceCount]; 50 | bool m_batteryVisible[vr::k_unMaxTrackedDeviceCount]; 51 | 52 | std::unique_ptr keyboardInput; 53 | 54 | public: 55 | void initStage1(); 56 | void initStage2( OverlayController* parent, QQuickWindow* widget ); 57 | 58 | void eventLoopTick(); 59 | 60 | bool alarmEnabled() const; 61 | bool alarmIsModal() const; 62 | int alarmTimeHour() const; 63 | int alarmTimeMinute() const; 64 | 65 | bool steamDesktopOverlayAvailable() const; 66 | float steamDesktopOverlayWidth() const; 67 | 68 | public slots: 69 | void sendKeyboardInput( QString input ); 70 | void sendKeyboardEnter(); 71 | void sendKeyboardAltTab(); 72 | void sendKeyboardBackspace( int count ); 73 | 74 | void setAlarmEnabled( bool enabled, bool notify = true ); 75 | void setAlarmIsModal( bool modal, bool notify = true ); 76 | void setAlarmTimeHour( int hour, bool notify = true ); 77 | void setAlarmTimeMinute( int min, bool notify = true ); 78 | void setAlarmTimeToCurrentTime(); 79 | void modAlarmTimeHour( int value, bool notify = true ); 80 | void modAlarmTimeMinute( int value, bool notify = true ); 81 | 82 | void setSteamDesktopOverlayWidth( float width, 83 | bool notify = true, 84 | bool notifyOpenVr = true ); 85 | 86 | signals: 87 | void alarmEnabledChanged( bool enabled ); 88 | void alarmIsModalChanged( bool modal ); 89 | void alarmTimeHourChanged( int hour ); 90 | void alarmTimeMinuteChanged( int min ); 91 | 92 | void steamDesktopOverlayAvailableChanged( bool available ); 93 | void steamDesktopOverlayWidthChanged( float width ); 94 | }; 95 | 96 | } // namespace advsettings 97 | -------------------------------------------------------------------------------- /src/tabcontrollers/audiomanager/AudioManagerDummy.cpp: -------------------------------------------------------------------------------- 1 | #include "AudioManagerDummy.h" 2 | 3 | // Used to get the compiler to shut up about C4100: unreferenced formal 4 | // parameter. The cast is to get GCC to shut up about it. 5 | #define UNREFERENCED_PARAMETER( P ) static_cast( ( P ) ) 6 | 7 | // application namespace 8 | namespace advsettings 9 | { 10 | void AudioManagerDummy::init( AudioTabController* controller ) 11 | { 12 | // noop 13 | UNREFERENCED_PARAMETER( controller ); 14 | } 15 | 16 | void AudioManagerDummy::setPlaybackDevice( const std::string& id, bool notify ) 17 | { 18 | // noop 19 | UNREFERENCED_PARAMETER( id ); 20 | UNREFERENCED_PARAMETER( notify ); 21 | } 22 | 23 | std::string AudioManagerDummy::getPlaybackDevName() 24 | { 25 | return "dummy"; 26 | } 27 | 28 | std::string AudioManagerDummy::getPlaybackDevId() 29 | { 30 | return "dummy"; 31 | } 32 | 33 | void AudioManagerDummy::setMirrorDevice( const std::string& id, bool notify ) 34 | { 35 | // noop 36 | UNREFERENCED_PARAMETER( id ); 37 | UNREFERENCED_PARAMETER( notify ); 38 | } 39 | 40 | bool AudioManagerDummy::isMirrorValid() 41 | { 42 | return false; 43 | } 44 | 45 | std::string AudioManagerDummy::getMirrorDevName() 46 | { 47 | return "dummy"; 48 | } 49 | 50 | std::string AudioManagerDummy::getMirrorDevId() 51 | { 52 | return "dummy"; 53 | } 54 | 55 | float AudioManagerDummy::getMirrorVolume() 56 | { 57 | return 0; 58 | } 59 | 60 | bool AudioManagerDummy::setMirrorVolume( float value ) 61 | { 62 | UNREFERENCED_PARAMETER( value ); 63 | return false; 64 | } 65 | 66 | bool AudioManagerDummy::getMirrorMuted() 67 | { 68 | return true; 69 | } 70 | 71 | bool AudioManagerDummy::setMirrorMuted( bool value ) 72 | { 73 | UNREFERENCED_PARAMETER( value ); 74 | return false; 75 | } 76 | 77 | bool AudioManagerDummy::isMicValid() 78 | { 79 | return false; 80 | } 81 | 82 | void AudioManagerDummy::setMicDevice( const std::string& id, bool notify ) 83 | { 84 | // noop 85 | UNREFERENCED_PARAMETER( id ); 86 | UNREFERENCED_PARAMETER( notify ); 87 | } 88 | 89 | std::string AudioManagerDummy::getMicDevName() 90 | { 91 | return "dummy"; 92 | } 93 | 94 | std::string AudioManagerDummy::getMicDevId() 95 | { 96 | return "dummy"; 97 | } 98 | 99 | float AudioManagerDummy::getMicVolume() 100 | { 101 | return 0; 102 | } 103 | 104 | bool AudioManagerDummy::setMicVolume( float value ) 105 | { 106 | UNREFERENCED_PARAMETER( value ); 107 | return false; 108 | } 109 | 110 | bool AudioManagerDummy::getMicMuted() 111 | { 112 | return true; 113 | } 114 | 115 | bool AudioManagerDummy::setMicMuted( bool value ) 116 | { 117 | UNREFERENCED_PARAMETER( value ); 118 | return false; 119 | } 120 | 121 | std::vector> 122 | AudioManagerDummy::getRecordingDevices() 123 | { 124 | return {}; 125 | } 126 | 127 | std::vector> 128 | AudioManagerDummy::getPlaybackDevices() 129 | { 130 | return {}; 131 | } 132 | 133 | } // namespace advsettings 134 | -------------------------------------------------------------------------------- /src/tabcontrollers/audiomanager/AudioManagerDummy.h: -------------------------------------------------------------------------------- 1 | #ifndef AUDIOMANAGERLINUX_H 2 | #define AUDIOMANAGERLINUX_H 3 | 4 | #include "../AudioManager.h" 5 | 6 | // application namespace 7 | namespace advsettings 8 | { 9 | class AudioManagerDummy : public AudioManager 10 | { 11 | public: 12 | virtual void init( AudioTabController* controller ) override; 13 | 14 | virtual void setPlaybackDevice( const std::string& id, 15 | bool notify = true ) override; 16 | virtual std::string getPlaybackDevName() override; 17 | virtual std::string getPlaybackDevId() override; 18 | 19 | virtual void setMirrorDevice( const std::string& id, 20 | bool notify = true ) override; 21 | virtual bool isMirrorValid() override; 22 | virtual std::string getMirrorDevName() override; 23 | virtual std::string getMirrorDevId() override; 24 | virtual float getMirrorVolume() override; 25 | virtual bool setMirrorVolume( float value ) override; 26 | virtual bool getMirrorMuted() override; 27 | virtual bool setMirrorMuted( bool value ) override; 28 | 29 | virtual bool isMicValid() override; 30 | virtual void setMicDevice( const std::string& id, 31 | bool notify = true ) override; 32 | virtual std::string getMicDevName() override; 33 | virtual std::string getMicDevId() override; 34 | virtual float getMicVolume() override; 35 | virtual bool setMicVolume( float value ) override; 36 | virtual bool getMicMuted() override; 37 | virtual bool setMicMuted( bool value ) override; 38 | 39 | virtual std::vector> 40 | getRecordingDevices() override; 41 | virtual std::vector> 42 | getPlaybackDevices() override; 43 | }; 44 | 45 | } // namespace advsettings 46 | #endif // AUDIOMANAGERLINUX_H 47 | -------------------------------------------------------------------------------- /src/tabcontrollers/audiomanager/AudioManagerWindows.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../AudioManager.h" 4 | 5 | #include 6 | #include 7 | #include 8 | #include "IPolicyConfig.h" 9 | #include 10 | 11 | // application namespace 12 | namespace advsettings 13 | { 14 | class AudioManagerWindows : public AudioManager, IMMNotificationClient 15 | { 16 | friend class AudioNotificationClient; 17 | 18 | private: 19 | std::recursive_mutex _mutex; 20 | AudioTabController* controller = nullptr; 21 | IMMDeviceEnumerator* audioDeviceEnumerator = nullptr; 22 | IMMDevice* playbackAudioDevice = nullptr; 23 | IMMDevice* mirrorAudioDevice = nullptr; 24 | IAudioEndpointVolume* mirrorAudioEndpointVolume = nullptr; 25 | IMMDevice* micAudioDevice = nullptr; 26 | IAudioEndpointVolume* micAudioEndpointVolume = nullptr; 27 | IPolicyConfig* policyConfig = nullptr; 28 | 29 | public: 30 | ~AudioManagerWindows() override; 31 | 32 | virtual void init( AudioTabController* controller ) override; 33 | 34 | virtual void setPlaybackDevice( const std::string& id, 35 | bool notify = true ) override; 36 | virtual std::string getPlaybackDevName() override; 37 | virtual std::string getPlaybackDevId() override; 38 | 39 | virtual void setMirrorDevice( const std::string& id, 40 | bool notify = true ) override; 41 | virtual bool isMirrorValid() override; 42 | virtual std::string getMirrorDevName() override; 43 | virtual std::string getMirrorDevId() override; 44 | virtual float getMirrorVolume() override; 45 | virtual bool setMirrorVolume( float value ) override; 46 | virtual bool getMirrorMuted() override; 47 | virtual bool setMirrorMuted( bool value ) override; 48 | 49 | virtual bool isMicValid() override; 50 | virtual void setMicDevice( const std::string& id, 51 | bool notify = true ) override; 52 | virtual std::string getMicDevName() override; 53 | virtual std::string getMicDevId() override; 54 | virtual float getMicVolume() override; 55 | virtual bool setMicVolume( float value ) override; 56 | virtual bool getMicMuted() override; 57 | virtual bool setMicMuted( bool value ) override; 58 | 59 | virtual std::vector> 60 | getRecordingDevices() override; 61 | virtual std::vector> 62 | getPlaybackDevices() override; 63 | 64 | void deleteMirrorDevice(); 65 | 66 | // from IMMNotificationClient 67 | virtual HRESULT QueryInterface( REFIID riid, void** ppvObject ) override; 68 | virtual ULONG AddRef( void ) override; 69 | virtual ULONG Release( void ) override; 70 | virtual HRESULT OnDeviceStateChanged( LPCWSTR pwstrDeviceId, 71 | DWORD dwNewState ) override; 72 | virtual HRESULT OnDeviceAdded( LPCWSTR pwstrDeviceId ) override; 73 | virtual HRESULT OnDeviceRemoved( LPCWSTR pwstrDeviceId ) override; 74 | virtual HRESULT 75 | OnDefaultDeviceChanged( EDataFlow flow, 76 | ERole role, 77 | LPCWSTR pwstrDefaultDeviceId ) override; 78 | virtual HRESULT OnPropertyValueChanged( LPCWSTR pwstrDeviceId, 79 | const PROPERTYKEY key ) override; 80 | 81 | private: 82 | IMMDeviceEnumerator* getAudioDeviceEnumerator(); 83 | IPolicyConfig* getPolicyConfig(); 84 | IMMDevice* 85 | getDefaultRecordingDevice( IMMDeviceEnumerator* deviceEnumerator ); 86 | IMMDevice* 87 | getDefaultPlaybackDevice( IMMDeviceEnumerator* deviceEnumerator ); 88 | IMMDevice* getDevice( IMMDeviceEnumerator* deviceEnumerator, 89 | const std::string& id ); 90 | IMMDevice* getDevice( IMMDeviceEnumerator* deviceEnumerator, LPCWSTR id ); 91 | IAudioEndpointVolume* getAudioEndpointVolume( IMMDevice* device ); 92 | std::string getDeviceName( IMMDevice* device ); 93 | std::string getDeviceId( IMMDevice* device ); 94 | std::vector> 95 | getDevices( IMMDeviceEnumerator* deviceEnumerator, EDataFlow dataFlow ); 96 | }; 97 | 98 | } // namespace advsettings 99 | -------------------------------------------------------------------------------- /src/tabcontrollers/audiomanager/IPolicyConfig.h: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // PolicyConfig.h 3 | // Undocumented COM-interface IPolicyConfig. 4 | // Use for set default audio render endpoint 5 | // @author EreTIk 6 | // ---------------------------------------------------------------------------- 7 | 8 | #pragma once 9 | 10 | // ca286fc3-91fd-42c3-8e9b-caafa66242e3 11 | static const GUID IID_IPolicyConfig2 12 | = { 0xCA286FC3, 13 | 0x91FD, 14 | 0x42C3, 15 | { 0x8E, 0x9B, 0xCA, 0xAF, 0xA6, 0x62, 0x42, 0xE3 } }; 16 | 17 | // 6be54be8-a068-4875-a49d-0c2966473b11 18 | static const GUID IID_IPolicyConfig1 19 | = { 0x6BE54BE8, 20 | 0xA068, 21 | 0x4875, 22 | { 0xA4, 0x9D, 0x0C, 0x29, 0x66, 0x47, 0x3B, 0x11 } }; 23 | 24 | // f8679f50-850a-41cf-9c72-430f290290c8 25 | static const GUID IID_IPolicyConfig0 26 | = { 0xF8679F50, 27 | 0x850A, 28 | 0x41CF, 29 | { 0x9C, 0x72, 0x43, 0x0F, 0x29, 0x02, 0x90, 0xC8 } }; 30 | 31 | class DECLSPEC_UUID( "870af99c-171d-4f9e-af0d-e63df40c2bc9" ) 32 | CPolicyConfigClient; 33 | 34 | interface IPolicyConfig : public IUnknown 35 | { 36 | public: 37 | virtual HRESULT GetMixFormat( PCWSTR, WAVEFORMATEX** ); 38 | 39 | virtual HRESULT STDMETHODCALLTYPE GetDeviceFormat( 40 | PCWSTR, INT, WAVEFORMATEX** ); 41 | 42 | virtual HRESULT STDMETHODCALLTYPE ResetDeviceFormat( PCWSTR ); 43 | 44 | virtual HRESULT STDMETHODCALLTYPE SetDeviceFormat( 45 | PCWSTR, WAVEFORMATEX*, WAVEFORMATEX* ); 46 | 47 | virtual HRESULT STDMETHODCALLTYPE GetProcessingPeriod( 48 | PCWSTR, INT, PINT64, PINT64 ); 49 | 50 | virtual HRESULT STDMETHODCALLTYPE SetProcessingPeriod( PCWSTR, PINT64 ); 51 | 52 | virtual HRESULT STDMETHODCALLTYPE GetShareMode( PCWSTR, 53 | struct DeviceShareMode* ); 54 | 55 | virtual HRESULT STDMETHODCALLTYPE SetShareMode( PCWSTR, 56 | struct DeviceShareMode* ); 57 | 58 | virtual HRESULT STDMETHODCALLTYPE GetPropertyValue( 59 | PCWSTR, int, const PROPERTYKEY&, const PROPVARIANT* ); 60 | 61 | virtual HRESULT STDMETHODCALLTYPE SetPropertyValue( 62 | PCWSTR, int, const PROPERTYKEY&, const PROPVARIANT* ); 63 | 64 | virtual HRESULT STDMETHODCALLTYPE SetDefaultEndpoint( 65 | __in PCWSTR wszDeviceId, __in ERole eRole ); 66 | 67 | virtual HRESULT STDMETHODCALLTYPE SetEndpointVisibility( PCWSTR, INT ); 68 | }; 69 | 70 | interface DECLSPEC_UUID( "568b9108-44bf-40b4-9006-86afe5b5a620" ) 71 | IPolicyConfigVista; 72 | class DECLSPEC_UUID( "294935CE-F637-4E7C-A41B-AB255460B862" ) 73 | CPolicyConfigVistaClient; 74 | // ---------------------------------------------------------------------------- 75 | // class CPolicyConfigVistaClient 76 | // {294935CE-F637-4E7C-A41B-AB255460B862} 77 | // 78 | // interface IPolicyConfigVista 79 | // {568b9108-44bf-40b4-9006-86afe5b5a620} 80 | // 81 | // Query interface: 82 | // CComPtr PolicyConfig; 83 | // PolicyConfig.CoCreateInstance(__uuidof(CPolicyConfigVistaClient)); 84 | // 85 | // @compatible: Windows Vista and Later 86 | // ---------------------------------------------------------------------------- 87 | interface IPolicyConfigVista : public IUnknown 88 | { 89 | public: 90 | virtual HRESULT GetMixFormat( 91 | PCWSTR, 92 | WAVEFORMATEX** ); // not available on Windows 7, use method from 93 | // IPolicyConfig 94 | 95 | virtual HRESULT STDMETHODCALLTYPE GetDeviceFormat( 96 | PCWSTR, INT, WAVEFORMATEX** ); 97 | 98 | virtual HRESULT STDMETHODCALLTYPE SetDeviceFormat( 99 | PCWSTR, WAVEFORMATEX*, WAVEFORMATEX* ); 100 | 101 | virtual HRESULT STDMETHODCALLTYPE GetProcessingPeriod( 102 | PCWSTR, 103 | INT, 104 | PINT64, 105 | PINT64 ); // not available on Windows 7, use method from IPolicyConfig 106 | 107 | virtual HRESULT STDMETHODCALLTYPE SetProcessingPeriod( 108 | PCWSTR, 109 | PINT64 ); // not available on Windows 7, use method from IPolicyConfig 110 | 111 | virtual HRESULT STDMETHODCALLTYPE GetShareMode( 112 | PCWSTR, 113 | struct DeviceShareMode* ); // not available on Windows 7, use method 114 | // from IPolicyConfig 115 | 116 | virtual HRESULT STDMETHODCALLTYPE SetShareMode( 117 | PCWSTR, 118 | struct DeviceShareMode* ); // not available on Windows 7, use method 119 | // from IPolicyConfig 120 | 121 | virtual HRESULT STDMETHODCALLTYPE GetPropertyValue( 122 | PCWSTR, int, const PROPERTYKEY&, const PROPVARIANT* ); 123 | 124 | virtual HRESULT STDMETHODCALLTYPE SetPropertyValue( 125 | PCWSTR, int, const PROPERTYKEY&, const PROPVARIANT* ); 126 | 127 | virtual HRESULT STDMETHODCALLTYPE SetDefaultEndpoint( 128 | __in PCWSTR wszDeviceId, __in ERole eRole ); 129 | 130 | virtual HRESULT STDMETHODCALLTYPE SetEndpointVisibility( 131 | PCWSTR, 132 | INT ); // not available on Windows 7, use method from IPolicyConfig 133 | }; 134 | -------------------------------------------------------------------------------- /src/tabcontrollers/keyboardinput/KeyboardInputDummy.cpp: -------------------------------------------------------------------------------- 1 | #include "KeyboardInputDummy.h" 2 | 3 | // Used to get the compiler to shut up about C4100: unreferenced formal 4 | // parameter. The cast is to get GCC to shut up about it. 5 | #define UNREFERENCED_PARAMETER( P ) static_cast( ( P ) ) 6 | 7 | namespace advsettings 8 | { 9 | void KeyboardInputDummy::sendKeyboardInput( QString input ) 10 | { 11 | // noop 12 | UNREFERENCED_PARAMETER( input ); 13 | } 14 | 15 | void KeyboardInputDummy::sendKeyboardEnter() 16 | { 17 | // noop 18 | } 19 | 20 | void KeyboardInputDummy::sendKeyboardBackspace( int count ) 21 | { 22 | // noop 23 | UNREFERENCED_PARAMETER( count ); 24 | } 25 | 26 | void KeyboardInputDummy::sendKeyboardAltTab() 27 | { 28 | // noop 29 | } 30 | 31 | } // namespace advsettings 32 | -------------------------------------------------------------------------------- /src/tabcontrollers/keyboardinput/KeyboardInputDummy.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYBOARDINPUTDUMMY_H 2 | #define KEYBOARDINPUTDUMMY_H 3 | 4 | #include "../KeyboardInput.h" 5 | 6 | // application namespace 7 | namespace advsettings 8 | { 9 | class KeyboardInputDummy : public KeyboardInput 10 | { 11 | public: 12 | virtual void sendKeyboardInput( QString input ) override; 13 | virtual void sendKeyboardEnter() override; 14 | virtual void sendKeyboardBackspace( int count ) override; 15 | virtual void sendKeyboardAltTab() override; 16 | }; 17 | 18 | } // namespace advsettings 19 | 20 | #endif // KEYBOARDINPUTDUMMY_H 21 | -------------------------------------------------------------------------------- /src/tabcontrollers/keyboardinput/KeyboardInputWindows.cpp: -------------------------------------------------------------------------------- 1 | #include "KeyboardInputWindows.h" 2 | #include 3 | #include "easylogging++.h" 4 | 5 | namespace advsettings 6 | { 7 | void fillKiStruct( INPUT& ip, WORD scanCode, bool keyup ) 8 | { 9 | ip.type = INPUT_KEYBOARD; 10 | ip.ki.wVk = scanCode; 11 | if ( keyup ) 12 | { 13 | ip.ki.dwFlags = KEYEVENTF_KEYUP; 14 | } 15 | else 16 | { 17 | ip.ki.dwFlags = 0; 18 | } 19 | ip.ki.wScan = 0; 20 | ip.ki.dwExtraInfo = 0; 21 | ip.ki.time = 0; 22 | }; 23 | 24 | void sendKeyboardInputRaw( int inputCount, LPINPUT input ) 25 | { 26 | if ( ( inputCount > 0 ) 27 | && !SendInput( 28 | static_cast( inputCount ), input, sizeof( INPUT ) ) ) 29 | { 30 | char* err; 31 | auto errCode = GetLastError(); 32 | if ( !FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER 33 | | FORMAT_MESSAGE_FROM_SYSTEM, 34 | nullptr, 35 | errCode, 36 | MAKELANGID( LANG_NEUTRAL, 37 | SUBLANG_DEFAULT ), // default language 38 | reinterpret_cast( &err ), 39 | 0, 40 | nullptr ) ) 41 | { 42 | LOG( ERROR ) 43 | << "Error calling SendInput(): Could not get error message (" 44 | << errCode << ")"; 45 | } 46 | else 47 | { 48 | LOG( ERROR ) << "Error calling SendInput(): " << err; 49 | } 50 | } 51 | } 52 | 53 | void KeyboardInputWindows::sendKeyboardInput( QString input ) 54 | { 55 | int len = input.length(); 56 | if ( len > 0 ) 57 | { 58 | LPINPUT ips = new INPUT[static_cast( len ) * 5 + 3]; 59 | int ii = 0; 60 | bool shiftPressed = false; 61 | bool ctrlPressed = false; 62 | bool altPressed = false; 63 | for ( int i = 0; i < len; i++ ) 64 | { 65 | short tmp = VkKeyScan( input.at( i ).toLatin1() ); 66 | WORD c = tmp & 0xFF; 67 | short shiftState = tmp >> 8; 68 | bool isShift = shiftState & 1; 69 | bool isCtrl = shiftState & 2; 70 | bool isAlt = shiftState & 4; 71 | if ( isShift && !shiftPressed ) 72 | { 73 | fillKiStruct( ips[ii++], VK_SHIFT, false ); 74 | shiftPressed = true; 75 | } 76 | else if ( !isShift && shiftPressed ) 77 | { 78 | fillKiStruct( ips[ii++], VK_SHIFT, true ); 79 | shiftPressed = false; 80 | } 81 | if ( isCtrl && !ctrlPressed ) 82 | { 83 | fillKiStruct( ips[ii++], VK_CONTROL, false ); 84 | ctrlPressed = true; 85 | } 86 | else if ( !isCtrl && ctrlPressed ) 87 | { 88 | fillKiStruct( ips[ii++], VK_CONTROL, true ); 89 | ctrlPressed = false; 90 | } 91 | if ( isAlt && !altPressed ) 92 | { 93 | fillKiStruct( ips[ii++], VK_MENU, false ); 94 | altPressed = true; 95 | } 96 | else if ( !isAlt && altPressed ) 97 | { 98 | fillKiStruct( ips[ii++], VK_MENU, true ); 99 | altPressed = false; 100 | } 101 | fillKiStruct( ips[ii++], c, false ); 102 | fillKiStruct( ips[ii++], c, true ); 103 | } 104 | if ( shiftPressed ) 105 | { 106 | fillKiStruct( ips[ii++], VK_SHIFT, true ); 107 | shiftPressed = false; 108 | } 109 | if ( ctrlPressed ) 110 | { 111 | fillKiStruct( ips[ii++], VK_CONTROL, true ); 112 | ctrlPressed = false; 113 | } 114 | if ( altPressed ) 115 | { 116 | fillKiStruct( ips[ii++], VK_MENU, true ); 117 | altPressed = false; 118 | } 119 | 120 | sendKeyboardInputRaw( ii, ips ); 121 | delete[] ips; 122 | } 123 | } 124 | 125 | void KeyboardInputWindows::sendKeyboardEnter() 126 | { 127 | LPINPUT ips = new INPUT[2]; 128 | fillKiStruct( ips[0], VK_RETURN, false ); 129 | fillKiStruct( ips[1], VK_RETURN, true ); 130 | 131 | sendKeyboardInputRaw( 2, ips ); 132 | delete[] ips; 133 | } 134 | 135 | void KeyboardInputWindows::sendKeyboardBackspace( int count ) 136 | { 137 | if ( count > 0 ) 138 | { 139 | // We ensure that count is nonnegative, therefore safe cast. 140 | LPINPUT ips = new INPUT[static_cast( count ) * 2]; 141 | for ( int i = 0; i < count; i++ ) 142 | { 143 | fillKiStruct( ips[2 * i], VK_BACK, false ); 144 | fillKiStruct( ips[2 * i + 1], VK_BACK, true ); 145 | } 146 | 147 | sendKeyboardInputRaw( count * 2, ips ); 148 | delete[] ips; 149 | } 150 | } 151 | 152 | void KeyboardInputWindows::sendKeyboardAltTab() 153 | { 154 | LPINPUT ips = new INPUT[4]; 155 | // VK_MENU is alt 156 | fillKiStruct( ips[0], VK_MENU, false ); 157 | fillKiStruct( ips[1], VK_TAB, false ); 158 | fillKiStruct( ips[2], VK_TAB, true ); 159 | fillKiStruct( ips[3], VK_MENU, true ); 160 | 161 | sendKeyboardInputRaw( 4, ips ); 162 | delete[] ips; 163 | } 164 | 165 | } // namespace advsettings 166 | -------------------------------------------------------------------------------- /src/tabcontrollers/keyboardinput/KeyboardInputWindows.h: -------------------------------------------------------------------------------- 1 | #ifndef KEYBOARDINPUTWINDOWS_H 2 | #define KEYBOARDINPUTWINDOWS_H 3 | 4 | #include "../KeyboardInput.h" 5 | 6 | // application namespace 7 | namespace advsettings 8 | { 9 | class KeyboardInputWindows : public KeyboardInput 10 | { 11 | public: 12 | virtual void sendKeyboardInput( QString input ) override; 13 | virtual void sendKeyboardEnter() override; 14 | virtual void sendKeyboardBackspace( int count ) override; 15 | virtual void sendKeyboardAltTab() override; 16 | }; 17 | 18 | } // namespace advsettings 19 | 20 | #endif // KEYBOARDINPUTWINDOWS_H 21 | -------------------------------------------------------------------------------- /src/utils/ChaperoneUtils.cpp: -------------------------------------------------------------------------------- 1 | #include "ChaperoneUtils.h" 2 | #include 3 | #include 4 | 5 | namespace utils 6 | { 7 | float ChaperoneUtils::_getDistanceToChaperone( 8 | const vr::HmdVector3_t& x, 9 | vr::HmdVector3_t* projectedPoint ) 10 | { 11 | float distance = NAN; 12 | vr::HmdVector3_t* _cornersPtr = _corners.get(); 13 | for ( uint32_t i = 0; i < _quadsCount; i++ ) 14 | { 15 | uint32_t i2 = ( i + 1 ) % _quadsCount; 16 | vr::HmdVector3_t& r0 = _cornersPtr[i]; 17 | vr::HmdVector3_t& r1 = _cornersPtr[i2]; 18 | float u_x = r1.v[0] - r0.v[0]; 19 | float u_z = r1.v[2] - r0.v[2]; 20 | float r = ( ( x.v[0] - r0.v[0] ) * u_x + ( x.v[2] - r0.v[2] ) * u_z ) 21 | / ( u_x * u_x + u_z * u_z ); 22 | // int mode = 0; // 0 .. projected point on segment, 1 .. projected 23 | // point outside of segment (r0 closer than r1), 2 .. projected point 24 | // outside of segment (r1 closer than r0) 25 | float d; 26 | float x1_x; 27 | float x1_z; 28 | if ( r < 0.0f || r > 1.0f ) 29 | { // projected point outside of segment 30 | float d_x = r0.v[0] - x.v[0]; 31 | float d_z = r0.v[2] - x.v[2]; 32 | float d1 = sqrt( d_x * d_x + d_z * d_z ); 33 | d_x = r1.v[0] - x.v[0]; 34 | d_z = r1.v[2] - x.v[2]; 35 | float d2 = sqrt( d_x * d_x + d_z * d_z ); 36 | if ( d1 < d2 ) 37 | { 38 | d = d1; 39 | x1_x = r0.v[0]; 40 | x1_z = r0.v[2]; 41 | } 42 | else 43 | { 44 | d = d2; 45 | x1_x = r1.v[0]; 46 | x1_z = r1.v[2]; 47 | } 48 | } 49 | else 50 | { // projected point on segment 51 | x1_x = r0.v[0] + r * u_x; 52 | x1_z = r0.v[2] + r * u_z; 53 | float d_x = x1_x - x.v[0]; 54 | float d_z = x1_z - x.v[2]; 55 | d = sqrt( d_x * d_x + d_z * d_z ); 56 | } 57 | if ( std::isnan( distance ) || d < distance ) 58 | { 59 | distance = d; 60 | if ( projectedPoint ) 61 | { 62 | projectedPoint->v[0] = x1_x; 63 | projectedPoint->v[1] = x.v[1]; 64 | projectedPoint->v[2] = x1_z; 65 | } 66 | } 67 | } 68 | return distance; 69 | } 70 | 71 | void ChaperoneUtils::loadChaperoneData() 72 | { 73 | std::lock_guard lock( _mutex ); 74 | vr::VRChaperoneSetup()->GetLiveCollisionBoundsInfo( nullptr, &_quadsCount ); 75 | if ( _quadsCount > 0 ) 76 | { 77 | std::unique_ptr quadsBuffer( 78 | new vr::HmdQuad_t[_quadsCount] ); 79 | vr::HmdQuad_t* quadsBufferPtr = quadsBuffer.get(); 80 | _corners.reset( ( vr::HmdVector3_t* ) new vr::HmdQuad_t[_quadsCount] ); 81 | vr::HmdVector3_t* _cornersPtr = _corners.get(); 82 | vr::VRChaperoneSetup()->GetLiveCollisionBoundsInfo( quadsBufferPtr, 83 | &_quadsCount ); 84 | for ( uint32_t i = 0; i < _quadsCount; i++ ) 85 | { 86 | _cornersPtr[i] = quadsBufferPtr[i].vCorners[0]; 87 | uint32_t i2 = ( i + 1 ) % _quadsCount; 88 | if ( quadsBufferPtr[i].vCorners[3].v[0] 89 | != quadsBufferPtr[i2].vCorners[0].v[0] 90 | || quadsBufferPtr[i].vCorners[3].v[1] 91 | != quadsBufferPtr[i2].vCorners[0].v[1] 92 | || quadsBufferPtr[i].vCorners[3].v[2] 93 | != quadsBufferPtr[i2].vCorners[0].v[2] 94 | || quadsBufferPtr[i].vCorners[0].v[1] != 0.0f ) 95 | { 96 | _chaperoneWellFormed = false; 97 | } 98 | } 99 | } 100 | } 101 | 102 | } // end namespace utils 103 | -------------------------------------------------------------------------------- /src/utils/ChaperoneUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | namespace utils 8 | { 9 | class ChaperoneUtils 10 | { 11 | private: 12 | std::recursive_mutex _mutex; 13 | uint32_t _quadsCount = 0; 14 | std::unique_ptr _corners; 15 | bool _chaperoneWellFormed = true; 16 | 17 | float _getDistanceToChaperone( const vr::HmdVector3_t& point, 18 | vr::HmdVector3_t* projectedPoint ); 19 | 20 | public: 21 | uint32_t quadsCount() const noexcept 22 | { 23 | return _quadsCount; 24 | } 25 | bool isChaperoneWellFormed() const noexcept 26 | { 27 | return _chaperoneWellFormed; 28 | } 29 | 30 | std::recursive_mutex& mutex() noexcept 31 | { 32 | return _mutex; 33 | } 34 | 35 | void loadChaperoneData(); 36 | 37 | float getDistanceToChaperone( const vr::HmdVector3_t& point, 38 | vr::HmdVector3_t* projectedPoint = nullptr, 39 | bool doLock = false ) 40 | { 41 | if ( doLock ) 42 | { 43 | std::lock_guard lock( _mutex ); 44 | return _getDistanceToChaperone( point, projectedPoint ); 45 | } 46 | else 47 | { 48 | return _getDistanceToChaperone( point, projectedPoint ); 49 | } 50 | } 51 | }; 52 | 53 | } // end namespace utils 54 | -------------------------------------------------------------------------------- /src/utils/Matrix.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace utils 7 | { 8 | inline vr::HmdMatrix34_t& initRotationMatrix( vr::HmdMatrix34_t& matrix, 9 | unsigned axisId, 10 | float angle ) 11 | { 12 | switch ( axisId ) 13 | { 14 | case 0: // x-axis 15 | matrix.m[0][0] = 1.0f; 16 | matrix.m[0][1] = 0.0f; 17 | matrix.m[0][2] = 0.0f; 18 | matrix.m[0][3] = 0.0f; 19 | matrix.m[1][0] = 0.0f; 20 | matrix.m[1][1] = std::cos( angle ); 21 | matrix.m[1][2] = -std::sin( angle ); 22 | matrix.m[1][3] = 0.0f; 23 | matrix.m[2][0] = 0.0f; 24 | matrix.m[2][1] = std::sin( angle ); 25 | matrix.m[2][2] = std::cos( angle ); 26 | matrix.m[2][3] = 0.0f; 27 | break; 28 | case 1: // y-axis 29 | matrix.m[0][0] = std::cos( angle ); 30 | matrix.m[0][1] = 0.0f; 31 | matrix.m[0][2] = std::sin( angle ); 32 | matrix.m[0][3] = 0.0f; 33 | matrix.m[1][0] = 0.0f; 34 | matrix.m[1][1] = 1.0f; 35 | matrix.m[1][2] = 0.0f; 36 | matrix.m[1][3] = 0.0f; 37 | matrix.m[2][0] = -std::sin( angle ); 38 | matrix.m[2][1] = 0.0f; 39 | matrix.m[2][2] = std::cos( angle ); 40 | matrix.m[2][3] = 0.0f; 41 | break; 42 | case 2: // z-axis 43 | matrix.m[0][0] = std::cos( angle ); 44 | matrix.m[0][1] = -std::sin( angle ); 45 | matrix.m[0][2] = 0.0f; 46 | matrix.m[0][3] = 0.0f; 47 | matrix.m[1][0] = std::sin( angle ); 48 | matrix.m[1][1] = std::cos( angle ); 49 | matrix.m[1][2] = 0.0f; 50 | matrix.m[1][3] = 0.0f; 51 | matrix.m[2][0] = 0.0f; 52 | matrix.m[2][1] = 0.0f; 53 | matrix.m[2][2] = 1.0f; 54 | matrix.m[2][3] = 0.0f; 55 | break; 56 | default: 57 | break; 58 | } 59 | return matrix; 60 | } 61 | 62 | inline vr::HmdMatrix34_t& matMul33( vr::HmdMatrix34_t& result, 63 | const vr::HmdMatrix34_t& a, 64 | const vr::HmdMatrix34_t& b ) 65 | { 66 | for ( unsigned i = 0; i < 3; i++ ) 67 | { 68 | for ( unsigned j = 0; j < 3; j++ ) 69 | { 70 | result.m[i][j] = 0.0f; 71 | for ( unsigned k = 0; k < 3; k++ ) 72 | { 73 | result.m[i][j] += a.m[i][k] * b.m[k][j]; 74 | } 75 | } 76 | } 77 | return result; 78 | } 79 | 80 | inline vr::HmdVector3_t& matMul33( vr::HmdVector3_t& result, 81 | const vr::HmdMatrix34_t& a, 82 | const vr::HmdVector3_t& b ) 83 | { 84 | for ( unsigned i = 0; i < 3; i++ ) 85 | { 86 | result.v[i] = 0.0f; 87 | for ( unsigned k = 0; k < 3; k++ ) 88 | { 89 | result.v[i] += a.m[i][k] * b.v[k]; 90 | }; 91 | } 92 | return result; 93 | } 94 | 95 | inline vr::HmdVector3_t& matMul33( vr::HmdVector3_t& result, 96 | const vr::HmdVector3_t& a, 97 | const vr::HmdMatrix34_t& b ) 98 | { 99 | for ( unsigned i = 0; i < 3; i++ ) 100 | { 101 | result.v[i] = 0.0f; 102 | for ( unsigned k = 0; k < 3; k++ ) 103 | { 104 | result.v[i] += a.v[k] * b.m[k][i]; 105 | }; 106 | } 107 | return result; 108 | } 109 | 110 | } // end namespace utils 111 | -------------------------------------------------------------------------------- /third-party/easylogging++/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2018 Zuhd Web Services 4 | Copyright (c) 2012-2018 @abumusamq 5 | 6 | https://github.com/zuhd-org/ 7 | https://zuhd.org 8 | https://muflihun.com 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy of 11 | this software and associated documentation files (the "Software"), to deal in 12 | the Software without restriction, including without limitation the rights to 13 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 14 | the Software, and to permit persons to whom the Software is furnished to do so, 15 | subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 22 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 23 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 24 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 25 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /third-party/openvr/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Valve Corporation 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its contributors 15 | may be used to endorse or promote products derived from this software without 16 | specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /third-party/openvr/README.md: -------------------------------------------------------------------------------- 1 | OpenVR SDK 2 | --- 3 | 4 | OpenVR is an API and runtime that allows access to VR hardware from multiple 5 | vendors without requiring that applications have specific knowledge of the 6 | hardware they are targeting. This repository is an SDK that contains the API 7 | and samples. The runtime is under SteamVR in Tools on Steam. 8 | 9 | ### Documentation 10 | 11 | Documentation for the API is available on the [Github Wiki](https://github.com/ValveSoftware/openvr/wiki/API-Documentation) 12 | 13 | More information on OpenVR and SteamVR can be found on http://steamvr.com 14 | -------------------------------------------------------------------------------- /third-party/openvr/bin/linux32/libopenvr_api.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/linux32/libopenvr_api.so -------------------------------------------------------------------------------- /third-party/openvr/bin/linux32/libopenvr_api.so.dbg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/linux32/libopenvr_api.so.dbg -------------------------------------------------------------------------------- /third-party/openvr/bin/linux64/libopenvr_api.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/linux64/libopenvr_api.so -------------------------------------------------------------------------------- /third-party/openvr/bin/linux64/libopenvr_api.so.dbg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/linux64/libopenvr_api.so.dbg -------------------------------------------------------------------------------- /third-party/openvr/bin/osx32/libopenvr_api.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/osx32/libopenvr_api.dylib -------------------------------------------------------------------------------- /third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.libopenvr_api.dylib 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/osx32/libopenvr_api.dylib.dSYM/Contents/Resources/DWARF/libopenvr_api.dylib -------------------------------------------------------------------------------- /third-party/openvr/bin/osx64/OpenVR.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /third-party/openvr/bin/osx64/OpenVR.framework/OpenVR: -------------------------------------------------------------------------------- 1 | Versions/Current/OpenVR -------------------------------------------------------------------------------- /third-party/openvr/bin/osx64/OpenVR.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /third-party/openvr/bin/osx64/OpenVR.framework/Versions/A/OpenVR: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/osx64/OpenVR.framework/Versions/A/OpenVR -------------------------------------------------------------------------------- /third-party/openvr/bin/osx64/OpenVR.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.valvesoftware.OpenVR.framework 7 | CFBundleInfoDictionaryVersion 8 | 6.0 9 | CFBundleName 10 | OpenVR 11 | CFBundlePackageType 12 | FMWK 13 | CFBundleShortVersionString 14 | 1.0 15 | CFBundleVersion 16 | 1.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /third-party/openvr/bin/osx64/OpenVR.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /third-party/openvr/bin/win32/openvr_api.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/win32/openvr_api.dll -------------------------------------------------------------------------------- /third-party/openvr/bin/win32/openvr_api.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/win32/openvr_api.pdb -------------------------------------------------------------------------------- /third-party/openvr/bin/win64/openvr_api.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/win64/openvr_api.dll -------------------------------------------------------------------------------- /third-party/openvr/bin/win64/openvr_api.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/bin/win64/openvr_api.pdb -------------------------------------------------------------------------------- /third-party/openvr/lib/linux32/libopenvr_api.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/lib/linux32/libopenvr_api.so -------------------------------------------------------------------------------- /third-party/openvr/lib/linux64/libopenvr_api.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/lib/linux64/libopenvr_api.so -------------------------------------------------------------------------------- /third-party/openvr/lib/osx32/libopenvr_api.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/lib/osx32/libopenvr_api.dylib -------------------------------------------------------------------------------- /third-party/openvr/lib/win32/openvr_api.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/lib/win32/openvr_api.lib -------------------------------------------------------------------------------- /third-party/openvr/lib/win64/openvr_api.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ykeara/OpenVR-AdvancedSettings/5d2b9076f679efd623062771bff5327d280ecb0c/third-party/openvr/lib/win64/openvr_api.lib --------------------------------------------------------------------------------