fix dx11 rendering in vr, fix various qrc references
This commit is contained in:
+22
-19
@@ -51,12 +51,12 @@ int main( int argc, char* argv[] )
|
||||
QQmlEngine qmlEngine;
|
||||
|
||||
// Just error checking to ensure QRC works properly
|
||||
//qDebug() << "list of qmldirs";
|
||||
//QDirIterator it( ":", QDirIterator::Subdirectories );
|
||||
//while ( it.hasNext() )
|
||||
//{
|
||||
// qDebug() << it.next();
|
||||
//}
|
||||
qDebug() << "list of qmldirs";
|
||||
QDirIterator it( ":", QDirIterator::Subdirectories );
|
||||
while ( it.hasNext() )
|
||||
{
|
||||
qDebug() << it.next();
|
||||
}
|
||||
|
||||
std::unique_ptr<advsettings::OverlayController> controller(
|
||||
new advsettings::OverlayController( commandLineArgs.desktopMode,
|
||||
@@ -103,23 +103,26 @@ int main( int argc, char* argv[] )
|
||||
|| settings::getSetting(
|
||||
settings::BoolSetting::APPLICATION_desktopModeToggle ) )
|
||||
{
|
||||
qDebug() << "Desktop MODE!";
|
||||
auto m_pWindow = new QQuickWindow();
|
||||
qobject_cast<QQuickItem*>( quickObj )
|
||||
->setParentItem( m_pWindow->contentItem() );
|
||||
m_pWindow->setGeometry(
|
||||
0,
|
||||
0,
|
||||
static_cast<int>(
|
||||
qobject_cast<QQuickItem*>( quickObj )->width() ),
|
||||
static_cast<int>(
|
||||
qobject_cast<QQuickItem*>( quickObj )->height() ) );
|
||||
m_pWindow->show();
|
||||
//TODO TEMP
|
||||
//qDebug() << "Desktop MODE!";
|
||||
//auto m_pWindow = new QQuickWindow();
|
||||
//qobject_cast<QQuickItem*>( quickObj )
|
||||
// ->setParentItem( m_pWindow->contentItem() );
|
||||
//m_pWindow->setGeometry(
|
||||
// 0,
|
||||
// 0,
|
||||
// static_cast<int>(
|
||||
// qobject_cast<QQuickItem*>( quickObj )->width() ),
|
||||
// static_cast<int>(
|
||||
// qobject_cast<QQuickItem*>( quickObj )->height() ) );
|
||||
//m_pWindow->show();
|
||||
}
|
||||
if ( commandLineArgs.resetSettings )
|
||||
{
|
||||
qInfo() << "WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE";
|
||||
// resets all settings if called
|
||||
ovr_settings_wrapper::resetAllSettings();
|
||||
//TODO TEMP
|
||||
//ovr_settings_wrapper::resetAllSettings();
|
||||
}
|
||||
|
||||
return mainEventLoop.exec();
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <qnamespace.h>
|
||||
#include <rhi/qrhi.h>
|
||||
#include <stdexcept>
|
||||
#include <d3d11.h>
|
||||
|
||||
// application namespace
|
||||
namespace advsettings
|
||||
@@ -92,6 +93,7 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
{
|
||||
m_desktopMode = desktopModeToggle();
|
||||
}
|
||||
m_desktopMode = false;
|
||||
|
||||
if ( !vr::VROverlay() )
|
||||
{
|
||||
@@ -535,8 +537,7 @@ void OverlayController::SetOverlayFromQRhiTexture( QRhiTexture& tex )
|
||||
break;
|
||||
case QRhi::D3D11:
|
||||
{
|
||||
qInfo() << "YEPPPERS HERE WE GO!";
|
||||
vrTex.handle = reinterpret_cast<void*>( tex.nativeTexture().object );
|
||||
vrTex.handle = reinterpret_cast<ID3D11Texture2D *>( tex.nativeTexture().object );
|
||||
vrTex.eType = vr::TextureType_DirectX;
|
||||
vrTex.eColorSpace = vr::ColorSpace_Auto;
|
||||
|
||||
@@ -609,7 +610,8 @@ bool OverlayController::pollNextEvent( vr::VROverlayHandle_t ulOverlayHandle,
|
||||
|
||||
QPointF OverlayController::getMousePositionForEvent( vr::VREvent_Mouse_t mouse )
|
||||
{
|
||||
float y = mouse.y;
|
||||
//TODO temp mouse is negative??
|
||||
float y = m_window.height() - mouse.y;
|
||||
#ifdef __linux__
|
||||
float h = static_cast<float>( m_window.height() );
|
||||
y = h - y;
|
||||
|
||||
+13
-13
@@ -28,7 +28,7 @@ MyStackViewPage {
|
||||
spacing: 10
|
||||
MyPushButton {
|
||||
id: steamVRButton
|
||||
iconPath: "qrc:/main_menu_icons/steamvr_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/steamvr_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " SteamVR"
|
||||
Layout.fillWidth: true
|
||||
@@ -40,7 +40,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: chaperoneButton
|
||||
iconPath: "qrc:/main_menu_icons/chaperone_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/chaperone_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Chaperone"
|
||||
Layout.fillWidth: true
|
||||
@@ -52,7 +52,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: playSpaceButton
|
||||
iconPath: "qrc:/main_menu_icons/offsets_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/offsets_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Offsets"
|
||||
Layout.fillWidth: true
|
||||
@@ -64,7 +64,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: motionButton
|
||||
iconPath: "qrc:/main_menu_icons/motion_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/motion_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Motion"
|
||||
Layout.fillWidth: true
|
||||
@@ -75,7 +75,7 @@ MyStackViewPage {
|
||||
}
|
||||
MyPushButton {
|
||||
id: rotationButton
|
||||
iconPath: "qrc:/main_menu_icons/rotation_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/rotation_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Rotation"
|
||||
Layout.fillWidth: true
|
||||
@@ -87,7 +87,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: fixFloorButton
|
||||
iconPath: "qrc:/main_menu_icons/space_fix_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/space_fix_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Space Fix"
|
||||
Layout.fillWidth: true
|
||||
@@ -99,7 +99,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: audioButton
|
||||
iconPath: "qrc:/main_menu_icons/audio_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/audio_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Audio"
|
||||
Layout.fillWidth: true
|
||||
@@ -111,7 +111,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: videoButton
|
||||
iconPath: "qrc:/main_menu_icons/video_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/video_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Video"
|
||||
Layout.fillWidth: true
|
||||
@@ -123,7 +123,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: utilitiesButton
|
||||
iconPath: "qrc:/main_menu_icons/utilities_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/utilities_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Utilities"
|
||||
Layout.fillWidth: true
|
||||
@@ -136,7 +136,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: statisticsButton
|
||||
iconPath: "qrc:/main_menu_icons/statistics_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/statistics_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Statistics"
|
||||
Layout.fillWidth: true
|
||||
@@ -153,7 +153,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: bindingsButton
|
||||
iconPath: "qrc:/main_menu_icons/bindings_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/bindings_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Bindings"
|
||||
Layout.fillWidth: true
|
||||
@@ -164,7 +164,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: settingsButton
|
||||
iconPath: "qrc:/main_menu_icons/settings_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/settings_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Settings"
|
||||
Layout.fillWidth: true
|
||||
@@ -379,7 +379,7 @@ MyStackViewPage {
|
||||
Layout.leftMargin: 12
|
||||
checkable: true
|
||||
contentItem: Image {
|
||||
source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on"
|
||||
source: parent.checked ? "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_off.svg" : "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_on.svg"
|
||||
sourceSize.width: 32
|
||||
sourceSize.height: 32
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -61,7 +61,7 @@ ColumnLayout {
|
||||
Layout.leftMargin: 12
|
||||
checkable: true
|
||||
contentItem: Image {
|
||||
source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on"
|
||||
source: parent.checked ? "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_on.svg" : "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_off.svg"
|
||||
sourceSize.width: 32
|
||||
sourceSize.height: 32
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -62,7 +62,7 @@ ColumnLayout {
|
||||
Layout.leftMargin: 12
|
||||
checkable: true
|
||||
contentItem: Image {
|
||||
source: parent.checked ? "qrc:/speaker/off" : "qrc:/speaker/on"
|
||||
source: parent.checked ? "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/speaker/speaker_off.svg" : "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/speaker/speaker_on.svg"
|
||||
sourceSize.width: 32
|
||||
sourceSize.height: 32
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings
|
||||
|
||||
Popup {
|
||||
id: myDialogPopup
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings
|
||||
|
||||
Popup {
|
||||
id: myDialogPopup
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
Button {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
Button {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
RadioButton {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.2
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
// Needed for OverlayController in the default folder.
|
||||
import ".."
|
||||
@@ -26,7 +27,7 @@ Rectangle {
|
||||
enabled: headerShowBackButton
|
||||
opacity: headerShowBackButton ? 1.0 : 0.0
|
||||
contentItem: Image {
|
||||
source: "qrc:/common/backarrow"
|
||||
source: "qrc:/qt/qml/AdvancedSettings/src/res/img/common/check.svg"
|
||||
sourceSize.width: 50
|
||||
sourceSize.height: 50
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
import ovras.advsettings
|
||||
|
||||
Text {
|
||||
color: "#d9dbe0"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
// Needed for OverlayControllers in the default folder.
|
||||
import ".."
|
||||
@@ -31,7 +32,7 @@ CheckBox {
|
||||
height: 28
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
source: "qrc:/common/box_checkmark"
|
||||
source: "qrc:/qt/qml/AdvancedSettings/src/res/img/common/check.svg"
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
visible: parent.parent.checked
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ".."
|
||||
import "../utilities_page"
|
||||
@@ -11,6 +11,7 @@ import "../steamvr_page"
|
||||
import "../rotation_page"
|
||||
import "../chaperone_page/chaperone_additional"
|
||||
import "../steamvr_page/steamvr_additional"
|
||||
import ovras.advsettings
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
@@ -25,10 +25,10 @@ GroupBox {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
property string playPauseButtonPath: "qrc:/media_keys/play_pause"
|
||||
property string stopButtonPath: "qrc:/media_keys/stop"
|
||||
property string previousButtonPath: "qrc:/media_keys/previous"
|
||||
property string nextButtonPath: "qrc:/media_keys/next"
|
||||
property string playPauseButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_play_pause_white_24dp.svg"
|
||||
property string stopButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_stop_white_24dp.svg"
|
||||
property string previousButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_skip_previous_white_24dp.svg"
|
||||
property string nextButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_skip_next_white_24dp.svg"
|
||||
|
||||
MediaButton {
|
||||
id: previousSongButton
|
||||
|
||||
@@ -89,9 +89,9 @@ void AudioTabController::initStage2( OverlayController* var_parent )
|
||||
}
|
||||
|
||||
m_pushToTalkValues.pushToTalkImg.reset(
|
||||
new QImage( ":qt/qml/AdvancedSettings/src/res/img/microphone/ptt_notification.png" ) );
|
||||
new QImage( ":/qt/qml/AdvancedSettings/src/res/img/audio/microphone/ptt_notification.png" ) );
|
||||
m_pushToTalkValues.pushToMuteImg.reset(
|
||||
new QImage( ":qt/qml/AdvancedSettings/src/res/img/microphone/ptm_notification.png" ) );
|
||||
new QImage( ":/qt/qml/AdvancedSettings/src/res/img/audio/microphone/ptm_notification.png" ) );
|
||||
|
||||
auto* pushToImg = m_pushToTalkValues.pushToTalkImg.get();
|
||||
if ( settings::getSetting( settings::BoolSetting::AUDIO_micReversePtt ) )
|
||||
|
||||
Reference in New Issue
Block a user