Remove features related to desktop overlay translation
The feature was killed by Valve and is not likely to come back.
This commit is contained in:
@@ -52,8 +52,5 @@ DISTFILES += \
|
|||||||
src/res/qml/video_page/overlaycolorbright/* \
|
src/res/qml/video_page/overlaycolorbright/* \
|
||||||
src/res/qml/common/* \
|
src/res/qml/common/* \
|
||||||
src/res/qml/desktop_overlay_page/* \
|
src/res/qml/desktop_overlay_page/* \
|
||||||
src/res/qml/desktop_overlay_page/translation_left_right/SteamDesktopTranslationLeftRight.qml \
|
|
||||||
src/res/qml/desktop_overlay_page/translation_back_forwards/SteamDesktopTranslationBackForwards.qml \
|
|
||||||
src/res/qml/desktop_overlay_page/translation_up_down/SteamDesktopTranslationUpDown.qml \
|
|
||||||
|
|
||||||
win32:RC_ICONS += src/res/img/icons/advicon256px.ico
|
win32:RC_ICONS += src/res/img/icons/advicon256px.ico
|
||||||
|
|||||||
@@ -10,36 +10,6 @@ vr::VROverlayHandle_t getOverlayHandle()
|
|||||||
return pOverlayHandle;
|
return pOverlayHandle;
|
||||||
}
|
}
|
||||||
|
|
||||||
vr::HmdMatrix34_t getDesktopOverlayPositions()
|
|
||||||
{
|
|
||||||
vr::HmdMatrix34_t currentPosition = {};
|
|
||||||
|
|
||||||
const auto overlayHandle = getOverlayHandle();
|
|
||||||
|
|
||||||
vr::ETrackingUniverseOrigin origin
|
|
||||||
= vr::ETrackingUniverseOrigin::TrackingUniverseStanding;
|
|
||||||
|
|
||||||
vr::VROverlay()->GetOverlayTransformAbsolute(
|
|
||||||
overlayHandle, &origin, ¤tPosition );
|
|
||||||
|
|
||||||
return currentPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDesktopOverlayPositions( vr::HmdMatrix34_t& positions )
|
|
||||||
{
|
|
||||||
const auto overlayHandle = getOverlayHandle();
|
|
||||||
|
|
||||||
// We need to make sure we get the same Universe Origin as before.
|
|
||||||
vr::HmdMatrix34_t currentPosition = {};
|
|
||||||
vr::ETrackingUniverseOrigin origin
|
|
||||||
= vr::ETrackingUniverseOrigin::TrackingUniverseStanding;
|
|
||||||
vr::VROverlay()->GetOverlayTransformAbsolute(
|
|
||||||
overlayHandle, &origin, ¤tPosition );
|
|
||||||
|
|
||||||
vr::VROverlay()->SetOverlayTransformAbsolute(
|
|
||||||
overlayHandle, origin, &positions );
|
|
||||||
}
|
|
||||||
|
|
||||||
void setDesktopOverlayWidth( double width )
|
void setDesktopOverlayWidth( double width )
|
||||||
{
|
{
|
||||||
const auto overlayHandle = getOverlayHandle();
|
const auto overlayHandle = getOverlayHandle();
|
||||||
@@ -74,27 +44,12 @@ overlay::DesktopOverlay::DesktopOverlay()
|
|||||||
settings.beginGroup( strings::settingsGroupName );
|
settings.beginGroup( strings::settingsGroupName );
|
||||||
m_width = settings.value( strings::widthSettingsName, defaultOverlayWidth )
|
m_width = settings.value( strings::widthSettingsName, defaultOverlayWidth )
|
||||||
.toDouble();
|
.toDouble();
|
||||||
m_forwardsMovement
|
|
||||||
= settings.value( strings::forwardsSettingsName, defaultMovement )
|
|
||||||
.toDouble();
|
|
||||||
m_rightMovement
|
|
||||||
= settings.value( strings::rightMovementSettingsName, defaultMovement )
|
|
||||||
.toDouble();
|
|
||||||
m_upMovement
|
|
||||||
= settings.value( strings::upMovementSettingsName, defaultMovement )
|
|
||||||
.toDouble();
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopOverlay::update()
|
void DesktopOverlay::update()
|
||||||
{
|
{
|
||||||
setDesktopOverlayWidth( m_width );
|
setDesktopOverlayWidth( m_width );
|
||||||
|
|
||||||
auto positionMatrix = getDesktopOverlayPositions();
|
|
||||||
|
|
||||||
auto changedPositions = getChangedMatrix( positionMatrix );
|
|
||||||
|
|
||||||
setDesktopOverlayPositions( changedPositions );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DesktopOverlay::isAvailable() const
|
bool DesktopOverlay::isAvailable() const
|
||||||
@@ -128,64 +83,4 @@ double DesktopOverlay::getCurrentWidth() const noexcept
|
|||||||
return m_width;
|
return m_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopOverlay::setRightMovement( double distance )
|
|
||||||
{
|
|
||||||
setSettingsToValue( strings::rightMovementSettingsName, distance );
|
|
||||||
m_rightMovement = distance;
|
|
||||||
}
|
|
||||||
|
|
||||||
double DesktopOverlay::getCurrentRightMovement() const noexcept
|
|
||||||
{
|
|
||||||
return m_rightMovement;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopOverlay::setForwardsMovement( double distance )
|
|
||||||
{
|
|
||||||
setSettingsToValue( strings::forwardsSettingsName, distance );
|
|
||||||
m_forwardsMovement = distance;
|
|
||||||
}
|
|
||||||
|
|
||||||
double DesktopOverlay::getCurrentForwardsMovement() const noexcept
|
|
||||||
{
|
|
||||||
return m_forwardsMovement;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopOverlay::setHeight( double height )
|
|
||||||
{
|
|
||||||
setSettingsToValue( strings::upMovementSettingsName, height );
|
|
||||||
m_upMovement = height;
|
|
||||||
}
|
|
||||||
|
|
||||||
double DesktopOverlay::getCurrentHeight() const noexcept
|
|
||||||
{
|
|
||||||
return m_upMovement;
|
|
||||||
}
|
|
||||||
|
|
||||||
vr::HmdMatrix34_t
|
|
||||||
DesktopOverlay::getChangedMatrix( vr::HmdMatrix34_t& matrix ) const noexcept
|
|
||||||
{
|
|
||||||
auto position = QVector3D( matrix.m[0][3], matrix.m[1][3], matrix.m[2][3] );
|
|
||||||
|
|
||||||
const auto screenRight
|
|
||||||
= QVector3D( matrix.m[0][0], matrix.m[1][0], matrix.m[2][0] );
|
|
||||||
|
|
||||||
const auto screenForwards
|
|
||||||
= QVector3D( matrix.m[0][2], matrix.m[1][2], matrix.m[2][2] );
|
|
||||||
|
|
||||||
const auto screenUp
|
|
||||||
= QVector3D( matrix.m[0][1], matrix.m[1][1], matrix.m[2][1] );
|
|
||||||
|
|
||||||
position += ( static_cast<float>( m_rightMovement ) * screenRight );
|
|
||||||
|
|
||||||
position += ( static_cast<float>( m_forwardsMovement ) * screenForwards );
|
|
||||||
|
|
||||||
position += ( static_cast<float>( m_upMovement ) * screenUp );
|
|
||||||
|
|
||||||
matrix.m[0][3] = position.x();
|
|
||||||
matrix.m[1][3] = position.y();
|
|
||||||
matrix.m[2][3] = position.z();
|
|
||||||
|
|
||||||
return matrix;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace overlay
|
} // namespace overlay
|
||||||
|
|||||||
@@ -16,26 +16,15 @@ namespace strings
|
|||||||
constexpr auto overlaykey = "valve.steam.desktop";
|
constexpr auto overlaykey = "valve.steam.desktop";
|
||||||
constexpr auto settingsGroupName = "utilitiesSettings";
|
constexpr auto settingsGroupName = "utilitiesSettings";
|
||||||
constexpr auto widthSettingsName = "desktopWidth";
|
constexpr auto widthSettingsName = "desktopWidth";
|
||||||
constexpr auto forwardsSettingsName = "desktopForwardsMovement";
|
|
||||||
constexpr auto rightMovementSettingsName = "desktopRightMovement";
|
|
||||||
constexpr auto upMovementSettingsName = "desktopUpMovement";
|
|
||||||
constexpr auto positionSettingsName = "desktopOverlayPosition";
|
|
||||||
} // namespace strings
|
} // namespace strings
|
||||||
|
|
||||||
constexpr auto defaultOverlayWidth = 4.0;
|
constexpr auto defaultOverlayWidth = 4.0;
|
||||||
constexpr auto defaultMovement = 0.0;
|
|
||||||
constexpr auto defaultWidth = 1.0;
|
|
||||||
|
|
||||||
class DesktopOverlay : public QObject
|
class DesktopOverlay : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Q_PROPERTY( double rightMovement READ getCurrentRightMovement()
|
|
||||||
WRITE setRightMovement )
|
|
||||||
Q_PROPERTY( double forwardsMovement READ getCurrentForwardsMovement WRITE
|
|
||||||
setForwardsMovement )
|
|
||||||
Q_PROPERTY( double width READ getCurrentWidth WRITE setWidth )
|
Q_PROPERTY( double width READ getCurrentWidth WRITE setWidth )
|
||||||
Q_PROPERTY( double height READ getCurrentHeight WRITE setHeight )
|
|
||||||
|
|
||||||
DesktopOverlay();
|
DesktopOverlay();
|
||||||
|
|
||||||
@@ -46,23 +35,8 @@ public:
|
|||||||
void setWidth( double width );
|
void setWidth( double width );
|
||||||
double getCurrentWidth() const noexcept;
|
double getCurrentWidth() const noexcept;
|
||||||
|
|
||||||
void setRightMovement( double distance );
|
|
||||||
double getCurrentRightMovement() const noexcept;
|
|
||||||
|
|
||||||
void setForwardsMovement( double distance );
|
|
||||||
double getCurrentForwardsMovement() const noexcept;
|
|
||||||
|
|
||||||
void setHeight( double height );
|
|
||||||
double getCurrentHeight() const noexcept;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
vr::HmdMatrix34_t getChangedMatrix( vr::HmdMatrix34_t& matrix ) const
|
|
||||||
noexcept;
|
|
||||||
|
|
||||||
double m_width = defaultOverlayWidth;
|
double m_width = defaultOverlayWidth;
|
||||||
double m_forwardsMovement = defaultMovement;
|
|
||||||
double m_rightMovement = defaultMovement;
|
|
||||||
double m_upMovement = defaultMovement;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace overlay
|
} // namespace overlay
|
||||||
|
|||||||
-22
@@ -1,22 +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: "Forwards/Backwards Translation"
|
|
||||||
|
|
||||||
lowerLimit: -4.0
|
|
||||||
upperLimit: 4.0
|
|
||||||
sliderStepSize: 0.10
|
|
||||||
kbUID: 603
|
|
||||||
|
|
||||||
function onValueChanged(value) {
|
|
||||||
DesktopOverlay.forwardsMovement = value
|
|
||||||
sliderText = value.toFixed(2)
|
|
||||||
}
|
|
||||||
function onComponentComplete() {
|
|
||||||
sliderValue = DesktopOverlay.forwardsMovement
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-22
@@ -1,22 +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: "Left/Right Translation"
|
|
||||||
|
|
||||||
lowerLimit: -4.0
|
|
||||||
upperLimit: 4.0
|
|
||||||
sliderStepSize: 0.10
|
|
||||||
kbUID: 604
|
|
||||||
|
|
||||||
function onValueChanged(value) {
|
|
||||||
DesktopOverlay.rightMovement = value
|
|
||||||
sliderText = value.toFixed(2)
|
|
||||||
}
|
|
||||||
function onComponentComplete() {
|
|
||||||
sliderValue = DesktopOverlay.rightMovement
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-22
@@ -1,22 +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: "Up/Down Translation"
|
|
||||||
|
|
||||||
lowerLimit: -4.0
|
|
||||||
upperLimit: 4.0
|
|
||||||
sliderStepSize: 0.10
|
|
||||||
kbUID: 602
|
|
||||||
|
|
||||||
function onValueChanged(value) {
|
|
||||||
DesktopOverlay.height = value
|
|
||||||
sliderText = value.toFixed(2)
|
|
||||||
}
|
|
||||||
function onComponentComplete() {
|
|
||||||
sliderValue = DesktopOverlay.height
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user