merged IceWind's most recent changes
This commit is contained in:
+39
-2
@@ -41,6 +41,7 @@ SOURCES += src/main.cpp\
|
||||
release/moc_UtilitiesTabController.cpp \
|
||||
src/tabcontrollers/audiomanager/AudioManagerWindows.cpp \
|
||||
src/tabcontrollers/AccessibilityTabController.cpp \
|
||||
src/overlaycontroller.cpp \
|
||||
src/tabcontrollers/AudioTabController.cpp \
|
||||
src/tabcontrollers/ChaperoneTabController.cpp \
|
||||
src/tabcontrollers/FixFloorTabController.cpp \
|
||||
@@ -77,6 +78,19 @@ HEADERS += src/overlaycontroller.h \
|
||||
src/tabcontrollers/audiomanager/IPolicyConfig.h \
|
||||
src/tabcontrollers/AccessibilityTabController.h \
|
||||
src/tabcontrollers/AudioManager.h \
|
||||
src/tabcontrollers/SettingsTabController.cpp \
|
||||
src/tabcontrollers/StatisticsTabController.cpp \
|
||||
src/tabcontrollers/SteamVRTabController.cpp \
|
||||
src/tabcontrollers/ReviveTabController.cpp \
|
||||
src/tabcontrollers/UtilitiesTabController.cpp \
|
||||
src/tabcontrollers/PttController.cpp \
|
||||
src/tabcontrollers/AccessibilityTabController.cpp \
|
||||
src/utils/ChaperoneUtils.cpp \
|
||||
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp \
|
||||
src/tabcontrollers/keyboardinput/KeyboardInputDummy.cpp
|
||||
|
||||
HEADERS += src/overlaycontroller.h \
|
||||
src/logging.h \
|
||||
src/tabcontrollers/AudioTabController.h \
|
||||
src/tabcontrollers/ChaperoneTabController.h \
|
||||
src/tabcontrollers/FixFloorTabController.h \
|
||||
@@ -98,13 +112,34 @@ HEADERS += src/overlaycontroller.h \
|
||||
third-party/openvr/headers/openvr.h \
|
||||
third-party/openvr/headers/openvr_capi.h \
|
||||
third-party/openvr/headers/openvr_driver.h
|
||||
src/tabcontrollers/SettingsTabController.h \
|
||||
src/tabcontrollers/StatisticsTabController.h \
|
||||
src/tabcontrollers/SteamVRTabController.h \
|
||||
src/tabcontrollers/ReviveTabController.h \
|
||||
src/tabcontrollers/UtilitiesTabController.h \
|
||||
src/tabcontrollers/AudioManager.h \
|
||||
src/tabcontrollers/PttController.h \
|
||||
src/tabcontrollers/AccessibilityTabController.h \
|
||||
src/tabcontrollers/KeyboardInput.h \
|
||||
src/utils/Matrix.h \
|
||||
src/utils/ChaperoneUtils.h \
|
||||
src/tabcontrollers/audiomanager/AudioManagerDummy.h \
|
||||
src/tabcontrollers/keyboardinput/KeyboardInputDummy.h
|
||||
|
||||
win32 {
|
||||
SOURCES += src/tabcontrollers/audiomanager/AudioManagerWindows.cpp \
|
||||
src/tabcontrollers/keyboardinput/KeyboardInputWindows.cpp
|
||||
HEADERS += src/tabcontrollers/audiomanager/AudioManagerWindows.h \
|
||||
src/tabcontrollers/keyboardinput/KeyboardInputWindows.h
|
||||
}
|
||||
|
||||
INCLUDEPATH += third-party/openvr/headers \
|
||||
third-party/easylogging++
|
||||
|
||||
win32:LIBS += -L"$$PWD/third-party/openvr/lib/win64"
|
||||
win32:LIBS += -L"$$PWD/third-party/openvr/lib/win64" -luser32 -lole32
|
||||
unix:LIBS += -L"$$PWD/third-party/openvr/lib/linux64"
|
||||
LIBS += -lopenvr_api -luser32 -lole32
|
||||
LIBS += -lopenvr_api
|
||||
|
||||
|
||||
DESTDIR = bin/win64/AdvancedSettings
|
||||
|
||||
@@ -143,3 +178,5 @@ DISTFILES += \
|
||||
src/res/qml/StatisticsPage.qml \
|
||||
src/res/qml/SteamVRPage.qml \
|
||||
src/res/qml/UtilitiesPage.qml
|
||||
win32:DESTDIR = bin/win64/AdvancedSettings
|
||||
unix:DESTDIR = bin/linux/AdvancedSettings
|
||||
|
||||
@@ -0,0 +1,318 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.7.2, 2018-11-08T17:22:36. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{e9f45e75-3f05-4ad6-a0dc-8a090aa48e0b}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.10.1 MSVC2017 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.10.1 MSVC2017 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5101.win64_msvc2017_64_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/robin/Documents/build-advancedSettings-Desktop_Qt_5_10_1_MSVC2017_64bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/robin/Documents/build-advancedSettings-Desktop_Qt_5_10_1_MSVC2017_64bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/robin/Documents/build-advancedSettings-Desktop_Qt_5_10_1_MSVC2017_64bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">advancedSettings</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">advancedSettings2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration://192.168.1.165/win10/OpenVR-AdvancedSettings/advancedSettings.pro</value>
|
||||
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">advancedSettings.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/Users/robin/Documents/build-advancedSettings-Desktop_Qt_5_10_1_MSVC2017_64bit-Debug/bin/win64/AdvancedSettings</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">18</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
@@ -28,6 +28,8 @@ namespace advsettings {
|
||||
|
||||
std::unique_ptr<OverlayController> OverlayController::singleton;
|
||||
|
||||
constexpr const char* OverlayController::applicationVersionString;
|
||||
|
||||
QSettings* OverlayController::_appSettings = nullptr;
|
||||
|
||||
OverlayController::~OverlayController() {
|
||||
@@ -328,6 +330,15 @@ bool OverlayController::pollNextEvent(vr::VROverlayHandle_t ulOverlayHandle, vr:
|
||||
}
|
||||
}
|
||||
|
||||
QPoint OverlayController::getMousePositionForEvent(vr::VREvent_Mouse_t mouse) {
|
||||
float y = mouse.y;
|
||||
#ifdef __linux__
|
||||
float h = (float) m_pWindow->height();
|
||||
y = h - y;
|
||||
#endif
|
||||
return QPoint(mouse.x, y);
|
||||
}
|
||||
|
||||
void OverlayController::OnTimeoutPumpEvents() {
|
||||
if (!vr::VRSystem())
|
||||
return;
|
||||
@@ -337,7 +348,7 @@ void OverlayController::OnTimeoutPumpEvents() {
|
||||
while (pollNextEvent(m_ulOverlayHandle, &vrEvent)) {
|
||||
switch (vrEvent.eventType) {
|
||||
case vr::VREvent_MouseMove: {
|
||||
QPoint ptNewMouse(vrEvent.data.mouse.x, vrEvent.data.mouse.y);
|
||||
QPoint ptNewMouse = getMousePositionForEvent(vrEvent.data.mouse);
|
||||
if (ptNewMouse != m_ptLastMouse) {
|
||||
QMouseEvent mouseEvent( QEvent::MouseMove, ptNewMouse, m_pWindow->mapToGlobal(ptNewMouse), Qt::NoButton, m_lastMouseButtons, 0 );
|
||||
m_ptLastMouse = ptNewMouse;
|
||||
@@ -348,7 +359,7 @@ void OverlayController::OnTimeoutPumpEvents() {
|
||||
break;
|
||||
|
||||
case vr::VREvent_MouseButtonDown: {
|
||||
QPoint ptNewMouse(vrEvent.data.mouse.x, vrEvent.data.mouse.y);
|
||||
QPoint ptNewMouse = getMousePositionForEvent(vrEvent.data.mouse);
|
||||
Qt::MouseButton button = vrEvent.data.mouse.button == vr::VRMouseButton_Right ? Qt::RightButton : Qt::LeftButton;
|
||||
m_lastMouseButtons |= button;
|
||||
QMouseEvent mouseEvent(QEvent::MouseButtonPress, ptNewMouse, m_pWindow->mapToGlobal(ptNewMouse), button, m_lastMouseButtons, 0);
|
||||
@@ -357,7 +368,7 @@ void OverlayController::OnTimeoutPumpEvents() {
|
||||
break;
|
||||
|
||||
case vr::VREvent_MouseButtonUp: {
|
||||
QPoint ptNewMouse(vrEvent.data.mouse.x, vrEvent.data.mouse.y);
|
||||
QPoint ptNewMouse = getMousePositionForEvent(vrEvent.data.mouse);
|
||||
Qt::MouseButton button = vrEvent.data.mouse.button == vr::VRMouseButton_Right ? Qt::RightButton : Qt::LeftButton;
|
||||
m_lastMouseButtons &= ~button;
|
||||
QMouseEvent mouseEvent(QEvent::MouseButtonRelease, ptNewMouse, m_pWindow->mapToGlobal(ptNewMouse), button, m_lastMouseButtons, 0);
|
||||
|
||||
@@ -90,7 +90,8 @@ public: // I know it's an ugly hack to make them public to enable external acces
|
||||
AccessibilityTabController accessibilityTabController;
|
||||
|
||||
private:
|
||||
OverlayController(bool desktopMode, bool noSound) : QObject(), desktopMode(desktopMode), noSound(noSound) {}
|
||||
OverlayController(bool desktopMode, bool noSound) : QObject(), desktopMode(desktopMode), noSound(noSound) {}
|
||||
QPoint getMousePositionForEvent(vr::VREvent_Mouse_t mouse);
|
||||
|
||||
public:
|
||||
virtual ~OverlayController();
|
||||
|
||||
@@ -2,14 +2,22 @@
|
||||
#include <QQuickWindow>
|
||||
#include <QApplication>
|
||||
#include "../overlaycontroller.h"
|
||||
#include "audiomanager/AudioManagerWindows.h"
|
||||
#ifdef _WIN32
|
||||
#include "audiomanager/AudioManagerWindows.h"
|
||||
#else
|
||||
#include "audiomanager/AudioManagerDummy.h"
|
||||
#endif
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
void AudioTabController::initStage1() {
|
||||
vr::EVRSettingsError vrSettingsError;
|
||||
#ifdef _WIN32
|
||||
audioManager.reset(new AudioManagerWindows());
|
||||
#else
|
||||
audioManager.reset(new AudioManagerDummy());
|
||||
#endif
|
||||
audioManager->init(this);
|
||||
m_playbackDevices = audioManager->getPlaybackDevices();
|
||||
m_recordingDevices = audioManager->getRecordingDevices();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "ChaperoneTabController.h"
|
||||
#include <QQuickWindow>
|
||||
#include "../overlaycontroller.h"
|
||||
#include <math.h>
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
class AudioTabController;
|
||||
|
||||
class KeyboardInput
|
||||
{
|
||||
public:
|
||||
virtual ~KeyboardInput() {};
|
||||
|
||||
virtual void sendKeyboardInput(QString input) = 0;
|
||||
virtual void sendKeyboardEnter() = 0;
|
||||
virtual void sendKeyboardBackspace(int count) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
#include <QQuickWindow>
|
||||
#include <QApplication>
|
||||
#include "../overlaycontroller.h"
|
||||
#include <Windows.h>
|
||||
#include <thread>
|
||||
#ifdef _WIN32
|
||||
#include "keyboardinput/KeyboardInputWindows.h"
|
||||
#else
|
||||
#include "keyboardinput/KeyboardInputDummy.h"
|
||||
#endif
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
@@ -11,6 +15,11 @@ namespace advsettings {
|
||||
const char* steamDesktopOverlaykey = "valve.steam.desktop";
|
||||
|
||||
void UtilitiesTabController::initStage1() {
|
||||
#ifdef _WIN32
|
||||
keyboardInput.reset(new KeyboardInputWindows());
|
||||
#else
|
||||
keyboardInput.reset(new KeyboardInputDummy());
|
||||
#endif
|
||||
auto settings = OverlayController::appSettings();
|
||||
settings->beginGroup("utilitiesSettings");
|
||||
auto qAlarmEnabled = settings->value("alarmEnabled", m_alarmEnabled);
|
||||
@@ -44,135 +53,16 @@ namespace advsettings {
|
||||
this->widget = widget;
|
||||
}
|
||||
|
||||
void fillKiStruct(INPUT& ip, WORD scanCode, bool keyup) {
|
||||
ip.type = INPUT_KEYBOARD;
|
||||
ip.ki.wVk = scanCode;
|
||||
if (keyup) {
|
||||
ip.ki.dwFlags = KEYEVENTF_KEYUP;
|
||||
} else {
|
||||
ip.ki.dwFlags = 0;
|
||||
}
|
||||
ip.ki.wScan = 0;
|
||||
ip.ki.dwExtraInfo = 0;
|
||||
ip.ki.time = 0;
|
||||
};
|
||||
|
||||
void UtilitiesTabController::sendKeyboardInput(QString input) {
|
||||
int len = input.length();
|
||||
if (len > 0) {
|
||||
LPINPUT ips = new INPUT[len * 5 + 3];
|
||||
unsigned ii = 0;
|
||||
bool shiftPressed = false;
|
||||
bool ctrlPressed = false;
|
||||
bool altPressed = false;
|
||||
for (int i = 0; i < len; i++) {
|
||||
short tmp = VkKeyScan(input.at(i).toLatin1());
|
||||
WORD c = tmp & 0xFF;
|
||||
short shiftState = tmp >> 8;
|
||||
bool isShift = shiftState & 1;
|
||||
bool isCtrl = shiftState & 2;
|
||||
bool isAlt = shiftState & 4;
|
||||
if (isShift && !shiftPressed) {
|
||||
fillKiStruct(ips[ii++], VK_SHIFT, false);
|
||||
shiftPressed = true;
|
||||
} else if (!isShift && shiftPressed) {
|
||||
fillKiStruct(ips[ii++], VK_SHIFT, true);
|
||||
shiftPressed = false;
|
||||
}
|
||||
if (isCtrl && !ctrlPressed) {
|
||||
fillKiStruct(ips[ii++], VK_CONTROL, false);
|
||||
ctrlPressed = true;
|
||||
} else if (!isCtrl && ctrlPressed) {
|
||||
fillKiStruct(ips[ii++], VK_CONTROL, true);
|
||||
ctrlPressed = false;
|
||||
}
|
||||
if (isAlt && !altPressed) {
|
||||
fillKiStruct(ips[ii++], VK_MENU, false);
|
||||
altPressed = true;
|
||||
} else if (!isAlt && altPressed) {
|
||||
fillKiStruct(ips[ii++], VK_MENU, true);
|
||||
altPressed = false;
|
||||
}
|
||||
fillKiStruct(ips[ii++], c, false);
|
||||
fillKiStruct(ips[ii++], c, true);
|
||||
}
|
||||
if (shiftPressed) {
|
||||
fillKiStruct(ips[ii++], VK_SHIFT, true);
|
||||
shiftPressed = false;
|
||||
}
|
||||
if (ctrlPressed) {
|
||||
fillKiStruct(ips[ii++], VK_CONTROL, true);
|
||||
ctrlPressed = false;
|
||||
}
|
||||
if (altPressed) {
|
||||
fillKiStruct(ips[ii++], VK_MENU, true);
|
||||
altPressed = false;
|
||||
}
|
||||
if (!SendInput(ii, ips, sizeof(INPUT))) {
|
||||
char *err;
|
||||
auto errCode = GetLastError();
|
||||
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
errCode,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
|
||||
(LPTSTR)&err,
|
||||
0,
|
||||
NULL)){
|
||||
LOG(ERROR) << "Error calling SendInput(): Could not get error message (" << errCode << ")";
|
||||
} else {
|
||||
LOG(ERROR) << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
delete ips;
|
||||
}
|
||||
keyboardInput->sendKeyboardInput(input);
|
||||
}
|
||||
|
||||
void UtilitiesTabController::sendKeyboardEnter() {
|
||||
LPINPUT ips = new INPUT[2];
|
||||
fillKiStruct(ips[0], VK_RETURN, false);
|
||||
fillKiStruct(ips[1], VK_RETURN, true);
|
||||
if (!SendInput(2, ips, sizeof(INPUT))) {
|
||||
char *err;
|
||||
auto errCode = GetLastError();
|
||||
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
errCode,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
|
||||
(LPTSTR)&err,
|
||||
0,
|
||||
NULL)) {
|
||||
LOG(ERROR) << "Error calling SendInput(): Could not get error message (" << errCode << ")";
|
||||
} else {
|
||||
LOG(ERROR) << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
delete ips;
|
||||
keyboardInput->sendKeyboardEnter();
|
||||
}
|
||||
|
||||
void UtilitiesTabController::sendKeyboardBackspace(int count) {
|
||||
if (count > 0) {
|
||||
LPINPUT ips = new INPUT[count * 2];
|
||||
for (int i = 0; i < count; i++) {
|
||||
fillKiStruct(ips[2 * i], VK_BACK, false);
|
||||
fillKiStruct(ips[2 * i + 1], VK_BACK, true);
|
||||
}
|
||||
if (!SendInput(2 * count, ips, sizeof(INPUT))) {
|
||||
char *err;
|
||||
auto errCode = GetLastError();
|
||||
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
errCode,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
|
||||
(LPTSTR)&err,
|
||||
0,
|
||||
NULL)) {
|
||||
LOG(ERROR) << "Error calling SendInput(): Could not get error message (" << errCode << ")";
|
||||
} else {
|
||||
LOG(ERROR) << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
delete ips;
|
||||
}
|
||||
keyboardInput->sendKeyboardBackspace(count);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <QObject>
|
||||
#include <QTime>
|
||||
#include <openvr.h>
|
||||
#include <memory>
|
||||
#include "KeyboardInput.h"
|
||||
|
||||
class QQuickWindow;
|
||||
// application namespace
|
||||
@@ -38,6 +40,8 @@ namespace advsettings {
|
||||
int m_batteryState[vr::k_unMaxTrackedDeviceCount];
|
||||
bool m_batteryVisible[vr::k_unMaxTrackedDeviceCount];
|
||||
|
||||
std::unique_ptr<KeyboardInput> keyboardInput;
|
||||
|
||||
public:
|
||||
void initStage1();
|
||||
void initStage2(OverlayController* parent, QQuickWindow* widget);
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
#include "AudioManagerDummy.h"
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
void AudioManagerDummy::init(AudioTabController *controller)
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
void AudioManagerDummy::setPlaybackDevice(const std::string &id, bool notify)
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
std::string AudioManagerDummy::getPlaybackDevName()
|
||||
{
|
||||
return "dummy";
|
||||
}
|
||||
|
||||
std::string AudioManagerDummy::getPlaybackDevId()
|
||||
{
|
||||
return "dummy";
|
||||
}
|
||||
|
||||
void AudioManagerDummy::setMirrorDevice(const std::string &id, bool notify)
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::isMirrorValid()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string AudioManagerDummy::getMirrorDevName()
|
||||
{
|
||||
return "dummy";
|
||||
}
|
||||
|
||||
std::string AudioManagerDummy::getMirrorDevId()
|
||||
{
|
||||
return "dummy";
|
||||
}
|
||||
|
||||
float AudioManagerDummy::getMirrorVolume()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::setMirrorVolume(float value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::getMirrorMuted()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::setMirrorMuted(bool value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::isMicValid()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void AudioManagerDummy::setMicDevice(const std::string &id, bool notify)
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
std::string AudioManagerDummy::getMicDevName()
|
||||
{
|
||||
return "dummy";
|
||||
}
|
||||
|
||||
std::string AudioManagerDummy::getMicDevId()
|
||||
{
|
||||
return "dummy";
|
||||
}
|
||||
|
||||
float AudioManagerDummy::getMicVolume()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::setMicVolume(float value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::getMicMuted()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AudioManagerDummy::setMicMuted(bool value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string, std::string> > AudioManagerDummy::getRecordingDevices()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string, std::string> > AudioManagerDummy::getPlaybackDevices()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#ifndef AUDIOMANAGERLINUX_H
|
||||
#define AUDIOMANAGERLINUX_H
|
||||
|
||||
#include "../AudioManager.h"
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
class AudioManagerDummy : public AudioManager
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void init(AudioTabController* controller) override;
|
||||
|
||||
virtual void setPlaybackDevice(const std::string& id, bool notify = true) override;
|
||||
virtual std::string getPlaybackDevName() override;
|
||||
virtual std::string getPlaybackDevId() override;
|
||||
|
||||
virtual void setMirrorDevice(const std::string& id, bool notify = true) override;
|
||||
virtual bool isMirrorValid() override;
|
||||
virtual std::string getMirrorDevName() override;
|
||||
virtual std::string getMirrorDevId() override;
|
||||
virtual float getMirrorVolume() override;
|
||||
virtual bool setMirrorVolume(float value) override;
|
||||
virtual bool getMirrorMuted() override;
|
||||
virtual bool setMirrorMuted(bool value) override;
|
||||
|
||||
virtual bool isMicValid() override;
|
||||
virtual void setMicDevice(const std::string& id, bool notify = true) override;
|
||||
virtual std::string getMicDevName() override;
|
||||
virtual std::string getMicDevId() override;
|
||||
virtual float getMicVolume() override;
|
||||
virtual bool setMicVolume(float value) override;
|
||||
virtual bool getMicMuted() override;
|
||||
virtual bool setMicMuted(bool value) override;
|
||||
|
||||
virtual std::vector<std::pair<std::string, std::string>> getRecordingDevices() override;
|
||||
virtual std::vector<std::pair<std::string, std::string>> getPlaybackDevices() override;
|
||||
};
|
||||
|
||||
}
|
||||
#endif // AUDIOMANAGERLINUX_H
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "../audiomanager.h"
|
||||
#include "../AudioManager.h"
|
||||
|
||||
#include <Mmdeviceapi.h>
|
||||
#include <Functiondiscoverykeys_devpkey.h>
|
||||
#include <Endpointvolume.h>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <functiondiscoverykeys_devpkey.h>
|
||||
#include <endpointvolume.h>
|
||||
#include "IPolicyConfig.h"
|
||||
#include <mutex>
|
||||
|
||||
@@ -26,7 +26,7 @@ private:
|
||||
IPolicyConfig* policyConfig = nullptr;
|
||||
|
||||
public:
|
||||
~AudioManagerWindows();
|
||||
~AudioManagerWindows() override;
|
||||
|
||||
virtual void init(AudioTabController* controller) override;
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "KeyboardInputDummy.h"
|
||||
|
||||
namespace advsettings {
|
||||
|
||||
void KeyboardInputDummy::sendKeyboardInput(QString input)
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
void KeyboardInputDummy::sendKeyboardEnter()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
void KeyboardInputDummy::sendKeyboardBackspace(int count)
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef KEYBOARDINPUTDUMMY_H
|
||||
#define KEYBOARDINPUTDUMMY_H
|
||||
|
||||
#include "../KeyboardInput.h"
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
class KeyboardInputDummy : public KeyboardInput
|
||||
{
|
||||
public:
|
||||
virtual void sendKeyboardInput(QString input) override;
|
||||
virtual void sendKeyboardEnter() override;
|
||||
virtual void sendKeyboardBackspace(int count) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // KEYBOARDINPUTDUMMY_H
|
||||
@@ -0,0 +1,141 @@
|
||||
#include "KeyboardInputWindows.h"
|
||||
#include <Windows.h>
|
||||
#include "../../logging.h"
|
||||
|
||||
namespace advsettings {
|
||||
|
||||
void fillKiStruct(INPUT& ip, WORD scanCode, bool keyup) {
|
||||
ip.type = INPUT_KEYBOARD;
|
||||
ip.ki.wVk = scanCode;
|
||||
if (keyup) {
|
||||
ip.ki.dwFlags = KEYEVENTF_KEYUP;
|
||||
} else {
|
||||
ip.ki.dwFlags = 0;
|
||||
}
|
||||
ip.ki.wScan = 0;
|
||||
ip.ki.dwExtraInfo = 0;
|
||||
ip.ki.time = 0;
|
||||
};
|
||||
|
||||
void KeyboardInputWindows::sendKeyboardInput(QString input)
|
||||
{
|
||||
int len = input.length();
|
||||
if (len > 0) {
|
||||
LPINPUT ips = new INPUT[len * 5 + 3];
|
||||
unsigned ii = 0;
|
||||
bool shiftPressed = false;
|
||||
bool ctrlPressed = false;
|
||||
bool altPressed = false;
|
||||
for (int i = 0; i < len; i++) {
|
||||
short tmp = VkKeyScan(input.at(i).toLatin1());
|
||||
WORD c = tmp & 0xFF;
|
||||
short shiftState = tmp >> 8;
|
||||
bool isShift = shiftState & 1;
|
||||
bool isCtrl = shiftState & 2;
|
||||
bool isAlt = shiftState & 4;
|
||||
if (isShift && !shiftPressed) {
|
||||
fillKiStruct(ips[ii++], VK_SHIFT, false);
|
||||
shiftPressed = true;
|
||||
} else if (!isShift && shiftPressed) {
|
||||
fillKiStruct(ips[ii++], VK_SHIFT, true);
|
||||
shiftPressed = false;
|
||||
}
|
||||
if (isCtrl && !ctrlPressed) {
|
||||
fillKiStruct(ips[ii++], VK_CONTROL, false);
|
||||
ctrlPressed = true;
|
||||
} else if (!isCtrl && ctrlPressed) {
|
||||
fillKiStruct(ips[ii++], VK_CONTROL, true);
|
||||
ctrlPressed = false;
|
||||
}
|
||||
if (isAlt && !altPressed) {
|
||||
fillKiStruct(ips[ii++], VK_MENU, false);
|
||||
altPressed = true;
|
||||
} else if (!isAlt && altPressed) {
|
||||
fillKiStruct(ips[ii++], VK_MENU, true);
|
||||
altPressed = false;
|
||||
}
|
||||
fillKiStruct(ips[ii++], c, false);
|
||||
fillKiStruct(ips[ii++], c, true);
|
||||
}
|
||||
if (shiftPressed) {
|
||||
fillKiStruct(ips[ii++], VK_SHIFT, true);
|
||||
shiftPressed = false;
|
||||
}
|
||||
if (ctrlPressed) {
|
||||
fillKiStruct(ips[ii++], VK_CONTROL, true);
|
||||
ctrlPressed = false;
|
||||
}
|
||||
if (altPressed) {
|
||||
fillKiStruct(ips[ii++], VK_MENU, true);
|
||||
altPressed = false;
|
||||
}
|
||||
if (!SendInput(ii, ips, sizeof(INPUT))) {
|
||||
char *err;
|
||||
auto errCode = GetLastError();
|
||||
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
errCode,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
|
||||
(LPTSTR)&err,
|
||||
0,
|
||||
NULL)){
|
||||
LOG(ERROR) << "Error calling SendInput(): Could not get error message (" << errCode << ")";
|
||||
} else {
|
||||
LOG(ERROR) << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
delete ips;
|
||||
}
|
||||
}
|
||||
|
||||
void KeyboardInputWindows::sendKeyboardEnter()
|
||||
{
|
||||
LPINPUT ips = new INPUT[2];
|
||||
fillKiStruct(ips[0], VK_RETURN, false);
|
||||
fillKiStruct(ips[1], VK_RETURN, true);
|
||||
if (!SendInput(2, ips, sizeof(INPUT))) {
|
||||
char *err;
|
||||
auto errCode = GetLastError();
|
||||
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
errCode,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
|
||||
(LPTSTR)&err,
|
||||
0,
|
||||
NULL)) {
|
||||
LOG(ERROR) << "Error calling SendInput(): Could not get error message (" << errCode << ")";
|
||||
} else {
|
||||
LOG(ERROR) << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
delete ips;
|
||||
}
|
||||
|
||||
void KeyboardInputWindows::sendKeyboardBackspace(int count)
|
||||
{
|
||||
if (count > 0) {
|
||||
LPINPUT ips = new INPUT[count * 2];
|
||||
for (int i = 0; i < count; i++) {
|
||||
fillKiStruct(ips[2 * i], VK_BACK, false);
|
||||
fillKiStruct(ips[2 * i + 1], VK_BACK, true);
|
||||
}
|
||||
if (!SendInput(2 * count, ips, sizeof(INPUT))) {
|
||||
char *err;
|
||||
auto errCode = GetLastError();
|
||||
if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
errCode,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // default language
|
||||
(LPTSTR)&err,
|
||||
0,
|
||||
NULL)) {
|
||||
LOG(ERROR) << "Error calling SendInput(): Could not get error message (" << errCode << ")";
|
||||
} else {
|
||||
LOG(ERROR) << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
delete ips;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef KEYBOARDINPUTWINDOWS_H
|
||||
#define KEYBOARDINPUTWINDOWS_H
|
||||
|
||||
#include "../KeyboardInput.h"
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
class KeyboardInputWindows : public KeyboardInput
|
||||
{
|
||||
public:
|
||||
virtual void sendKeyboardInput(QString input) override;
|
||||
virtual void sendKeyboardEnter() override;
|
||||
virtual void sendKeyboardBackspace(int count) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // KEYBOARDINPUTWINDOWS_H
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
#include "ChaperoneUtils.h"
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
|
||||
namespace utils {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user