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:
@@ -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
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -57,8 +57,6 @@ enum class DoubleSetting
|
||||
PLAYSPACE_gravityStrength,
|
||||
PLAYSPACE_flingStrength,
|
||||
|
||||
UTILITY_desktopWidth,
|
||||
|
||||
VIDEO_brightnessOpacityValue,
|
||||
VIDEO_brightnessValue,
|
||||
VIDEO_colorOverlayOpacity,
|
||||
|
||||
Reference in New Issue
Block a user