Completely remove features related to Desktop Overlay

As of SteamVR 1.10.1 the overlay width feature has been implemented by
Valve in the standard settings.
OpenVR features related to overlay translation have been removed and the
main reason for including them (multi monitor setups) have been solved
by Valve giving each screen an individual overlay.
This commit is contained in:
Vasily
2020-01-16 00:09:09 +01:00
committed by username223
parent ebc2d92333
commit 0bc77b2fd0
12 changed files with 1 additions and 190 deletions
+1 -3
View File
@@ -35,7 +35,6 @@ DISTFILES += \
src/res/qml/utilities_page/* \
src/res/qml/utilities_page/media_keys/* \
src/res/qml/utilities_page/keyboard_utils/* \
src/res/qml/desktop_overlay_page/desktop_size/* \
src/res/qml/utilities_page/alarm_clock/* \
src/res/qml/audio_page/dialog_boxes/* \
src/res/qml/audio_page/device_selector/* \
@@ -50,7 +49,6 @@ DISTFILES += \
src/res/qml/video_page/profiles/* \
src/res/qml/video_page/dialogboxes/* \
src/res/qml/video_page/overlaycolorbright/* \
src/res/qml/common/* \
src/res/qml/desktop_overlay_page/* \
src/res/qml/common/*
win32:RC_ICONS += src/res/img/icons/advicon256px.ico
-2
View File
@@ -16,7 +16,6 @@ SOURCES += src/main.cpp\
src/utils/setup.cpp \
src/utils/paths.cpp \
src/utils/FrameRateUtils.cpp \
src/openvr/overlay_utils.cpp \
src/keyboard_input/keyboard_input.cpp \
src/keyboard_input/input_parser.cpp \
src/settings/settings.cpp \
@@ -50,7 +49,6 @@ HEADERS += src/overlaycontroller.h \
src/utils/setup.h \
src/utils/paths.h \
src/utils/FrameRateUtils.h \
src/openvr/overlay_utils.h \
src/keyboard_input/input_parser.h \
src/keyboard_input/input_sender.h \
src/settings/settings.h \
-69
View File
@@ -1,69 +0,0 @@
#include "overlay_utils.h"
#include "../overlaycontroller.h"
#include "../settings/settings.h"
namespace overlay
{
namespace strings
{
constexpr auto overlaykey = "valve.steam.desktop";
} // namespace strings
vr::VROverlayHandle_t getOverlayHandle()
{
vr::VROverlayHandle_t pOverlayHandle;
vr::VROverlay()->FindOverlay( strings::overlaykey, &pOverlayHandle );
return pOverlayHandle;
}
void setDesktopOverlayWidth( double width )
{
const auto overlayHandle = getOverlayHandle();
auto error = vr::VROverlay()->SetOverlayWidthInMeters(
overlayHandle, static_cast<float>( width ) );
if ( error != vr::VROverlayError_None )
{
LOG( ERROR ) << "Could not modify overlay width of \""
<< strings::overlaykey << "\": "
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( error );
}
}
void DesktopOverlay::update()
{
setDesktopOverlayWidth( getCurrentWidth() );
}
bool DesktopOverlay::isAvailable() const
{
vr::VROverlayHandle_t pOverlayHandle = 0;
auto error
= vr::VROverlay()->FindOverlay( strings::overlaykey, &pOverlayHandle );
if ( error != vr::VROverlayError_None )
{
LOG( INFO ) << "Could not find overlay \"" << strings::overlaykey
<< "\": "
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( error );
return false;
}
return true;
}
void overlay::DesktopOverlay::setWidth( double width )
{
if ( width < 0.01 )
{
width = 0.01;
}
settings::setSetting( settings::DoubleSetting::UTILITY_desktopWidth,
width );
}
double DesktopOverlay::getCurrentWidth() const noexcept
{
return settings::getSetting(
settings::DoubleSetting::UTILITY_desktopWidth );
}
} // namespace overlay
-28
View File
@@ -1,28 +0,0 @@
#pragma once
#include <QObject>
#include <openvr.h>
#include <easylogging++.h>
#include <QVector2D>
#include <QVector3D>
#include <QSettings>
void outputMat();
void transformMat();
namespace overlay
{
class DesktopOverlay : public QObject
{
Q_OBJECT
public:
Q_PROPERTY( double width READ getCurrentWidth WRITE setWidth )
Q_INVOKABLE void update();
bool isAvailable() const;
void setWidth( double width );
double getCurrentWidth() const noexcept;
};
} // namespace overlay
-12
View File
@@ -20,7 +20,6 @@
#include <openvr.h>
#include <easylogging++.h>
#include "utils/Matrix.h"
#include "openvr/overlay_utils.h"
#include "keyboard_input/input_sender.h"
#include "settings/settings.h"
@@ -284,16 +283,6 @@ OverlayController::OverlayController( bool desktopMode,
QQmlEngine::setObjectOwnership( obj, QQmlEngine::CppOwnership );
return obj;
} );
qmlRegisterSingletonType<overlay::DesktopOverlay>(
qmlSingletonImportName,
1,
0,
"DesktopOverlay",
[]( QQmlEngine*, QJSEngine* ) {
QObject* obj = &( objectAddress->m_desktopOverlay );
QQmlEngine::setObjectOwnership( obj, QQmlEngine::CppOwnership );
return obj;
} );
// Grab local version number
QStringList verNumericalString
@@ -1014,7 +1003,6 @@ void OverlayController::mainEventLoop()
case vr::VREvent_DashboardActivated:
{
LOG( DEBUG ) << "Dashboard activated";
m_desktopOverlay.update();
m_dashboardVisible = true;
}
break;
-2
View File
@@ -42,7 +42,6 @@
#include "tabcontrollers/VideoTabController.h"
#include "openvr/ivrinput.h"
#include "openvr/overlay_utils.h"
namespace application_strings
{
@@ -163,7 +162,6 @@ public: // I know it's an ugly hack to make them public to enable external
SettingsTabController m_settingsTabController;
UtilitiesTabController m_utilitiesTabController;
VideoTabController m_videoTabController;
overlay::DesktopOverlay m_desktopOverlay;
private:
QPoint getMousePositionForEvent( vr::VREvent_Mouse_t mouse );
-1
View File
@@ -6,7 +6,6 @@ import "../utilities_page"
import "../audio_page"
import "../motion_page"
import "../video_page"
import "../desktop_overlay_page"
import "../chaperone_page"
import "../steamvr_page"
@@ -1,40 +0,0 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
import "translation_left_right"
import "translation_back_forwards"
import "translation_up_down"
import "desktop_size"
import "../common"
MyStackViewPage {
headerText: "Desktop Overlay"
content: ColumnLayout {
spacing: 18
MyText {
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: "Reopen overlay to apply."
}
SteamDesktopGroupBox {
}
SteamDesktopTranslationUpDown {
}
SteamDesktopTranslationBackForwards {
}
SteamDesktopTranslationLeftRight {
}
Item {
Layout.fillHeight: true
}
}
}
@@ -1,23 +0,0 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import ovras.advsettings 1.0
import "../../common"
FullWidthSliderBox {
headerMessage: "Desktop Overlay Width: (refresh dashboard to apply)"
lowerLimit: 0.0
upperLimit: 32.0
sliderStepSize: 0.5
kbUID: 601
function onValueChanged(value) {
DesktopOverlay.width = value
sliderText = value.toFixed(2)
}
function onComponentComplete() {
sliderValue = DesktopOverlay.width
}
}
-4
View File
@@ -5,7 +5,6 @@ import ovras.advsettings 1.0
import "../common"
import "camera"
import "steamvrmisc"
import "../desktop_overlay_page/desktop_size"
MyStackViewPage {
width: 1200
@@ -19,9 +18,6 @@ MyStackViewPage {
CameraGroupBox {
id: cameraGroupBox}
SteamDesktopGroupBox {
}
Item { Layout.fillHeight: true; Layout.fillWidth: true}
RowLayout {
@@ -366,10 +366,6 @@ private:
SettingCategory::Playspace,
QtInfo{ "flingStrength" },
1.0 },
DoubleSettingValue{ DoubleSetting::UTILITY_desktopWidth,
SettingCategory::Utility,
QtInfo{ "desktopWidth" },
4.0 },
DoubleSettingValue{ DoubleSetting::VIDEO_brightnessOpacityValue,
SettingCategory::Video,
-2
View File
@@ -57,8 +57,6 @@ enum class DoubleSetting
PLAYSPACE_gravityStrength,
PLAYSPACE_flingStrength,
UTILITY_desktopWidth,
VIDEO_brightnessOpacityValue,
VIDEO_brightnessValue,
VIDEO_colorOverlayOpacity,