diff --git a/src/overlaycontroller.cpp b/src/overlaycontroller.cpp index 97a3bce..cde705a 100644 --- a/src/overlaycontroller.cpp +++ b/src/overlaycontroller.cpp @@ -420,7 +420,6 @@ void OverlayController::SetWidget( QQuickItem* quickItem, m_steamVRTabController.initStage2( this, m_pWindow.get() ); m_chaperoneTabController.initStage2( this, m_pWindow.get() ); - m_moveCenterTabController.initStage2( this, m_pWindow.get() ); m_fixFloorTabController.initStage2( this, m_pWindow.get() ); m_audioTabController.initStage2( this, m_pWindow.get() ); m_statisticsTabController.initStage2( this, m_pWindow.get() ); @@ -428,6 +427,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem, m_reviveTabController.initStage2( this, m_pWindow.get() ); m_utilitiesTabController.initStage2( this, m_pWindow.get() ); m_videoTabController.initStage2( this, m_pWindow.get() ); + m_moveCenterTabController.initStage2( this, m_pWindow.get() ); } void OverlayController::OnRenderRequest() diff --git a/src/tabcontrollers/MoveCenterTabController.cpp b/src/tabcontrollers/MoveCenterTabController.cpp index 37b83e0..c08bae6 100644 --- a/src/tabcontrollers/MoveCenterTabController.cpp +++ b/src/tabcontrollers/MoveCenterTabController.cpp @@ -131,7 +131,6 @@ void MoveCenterTabController::initStage1() settings->endGroup(); m_lastDragUpdateTimePoint = std::chrono::steady_clock::now(); m_lastGravityUpdateTimePoint = std::chrono::steady_clock::now(); - zeroOffsets(); } void MoveCenterTabController::initStage2( OverlayController* var_parent, @@ -139,6 +138,7 @@ void MoveCenterTabController::initStage2( OverlayController* var_parent, { this->parent = var_parent; this->widget = var_widget; + zeroOffsets(); } void MoveCenterTabController::outputLogPoses() @@ -961,7 +961,13 @@ void MoveCenterTabController::updateSeatedResetData() emit offsetYChanged( m_offsetY ); emit offsetZChanged( m_offsetZ ); emit rotationChanged( m_rotation ); - parent->chaperoneUtils().loadChaperoneData( false ); + unsigned checkQuadCount = 0; + vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr, + &checkQuadCount ); + if ( checkQuadCount > 0 ) + { + parent->chaperoneUtils().loadChaperoneData( false ); + } } void MoveCenterTabController::updateChaperoneResetData() @@ -1024,7 +1030,13 @@ void MoveCenterTabController::updateChaperoneResetData() } } - parent->chaperoneUtils().loadChaperoneData( false ); + unsigned checkQuadCount = 0; + vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr, + &checkQuadCount ); + if ( checkQuadCount > 0 ) + { + parent->chaperoneUtils().loadChaperoneData( false ); + } } void MoveCenterTabController::applyChaperoneResetData() @@ -1043,7 +1055,13 @@ void MoveCenterTabController::applyChaperoneResetData() vr::VRChaperoneSetup()->CommitWorkingCopy( vr::EChaperoneConfigFile_Live ); - parent->chaperoneUtils().loadChaperoneData( false ); + unsigned checkQuadCount = 0; + vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr, + &checkQuadCount ); + if ( checkQuadCount > 0 ) + { + parent->chaperoneUtils().loadChaperoneData( false ); + } } // START of drag bindings: @@ -1760,7 +1778,13 @@ void MoveCenterTabController::saveUncommittedChaperone() vr::VRChaperoneSetup()->CommitWorkingCopy( vr::EChaperoneConfigFile_Live ); m_chaperoneCommitted = true; - parent->chaperoneUtils().loadChaperoneData( false ); + unsigned checkQuadCount = 0; + vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( + nullptr, &checkQuadCount ); + if ( checkQuadCount > 0 ) + { + parent->chaperoneUtils().loadChaperoneData( false ); + } } } @@ -2240,7 +2264,10 @@ void MoveCenterTabController::updateSpace() // loadChaperoneData( false ), false so that we don't load live data, and // reference the working set instead. - parent->chaperoneUtils().loadChaperoneData( false ); + if ( m_collisionBoundsCountForReset > 0 ) + { + parent->chaperoneUtils().loadChaperoneData( false ); + } m_oldOffsetX = m_offsetX; m_oldOffsetY = m_offsetY; diff --git a/third-party/openvr/README.md b/third-party/openvr/README.md index da63c05..5976d62 100644 --- a/third-party/openvr/README.md +++ b/third-party/openvr/README.md @@ -1,70 +1,13 @@ -# OpenVR Samples: CMake build guide. - -## Support - -| Configuration | 32 | 64 | -| ----------------------- |:---------:|----------:| -| GNU/Linux (gcc 4.8+) | OK | OK | -| Windows (msvc 12) | OK | OK | -| OSX (clang) | ~ | ~ | - - -## Dependencies - -* Qt 5.x -* GLEW 1.11+ -* SDL2 -* OpenVR - -The only general external dependency is Qt5.
-On GNU/Linux, you will need GLEW 1.11 (available on most package manager).
-On Windows x64, you will need the SDL2 runtime library. - -## Build - -**Important:**
-*you might need to specify Qt5 cmake module path manually when generating the cache for the first time using the __CMAKE_PREFIX_PATH__ macro (see examples below).* - -We will use the command-line on Unix and [Git Bash](https://git-for-windows.github.io/) on Windows. - -First, move from the repository root to the samples directory to create a build directory: -``` -cd samples -mkdir build; cd build -``` - -Then, depending on your system: - -### Unix - -Generate the CMake cache using Makefile: -``` -cmake .. -G Makefile -DCMAKE_PREFIX_PATH=/opt/Qt/5.6/gcc_64/lib/cmake -DCMAKE_BUILD_TYPE=Release -``` - -To build type: -``` -make -j4 -``` - - -### Windows - -Generate the CMake cache using MSVC 12 for x64: -``` -cmake .. -G "Visual Studio 12 2013 Win64" -DCMAKE_PREFIX_PATH=C:/Qt/5.6/msvc2013_64/lib/cmake -``` - -Alternatively, you can force the compilation on x86 architectures by using the **PLATFORM** property (*be sure to use the right generator and Qt binaries*): -``` -cmake .. -G "Visual Studio 12 2013" -DCMAKE_PREFIX_PATH=C:/Qt/5.6/msvc2013/lib/cmake -DPLATFORM=32 -``` - -To build, simply type: -``` -cmake --build . --target all --config Release -``` - -*Note : using CMake, the build configuration type (ie. Debug, Release) is set at Build Time with MSVC and at Cache Generation Time with Makefile.* - +OpenVR SDK --- + +OpenVR is an API and runtime that allows access to VR hardware from multiple +vendors without requiring that applications have specific knowledge of the +hardware they are targeting. This repository is an SDK that contains the API +and samples. The runtime is under SteamVR in Tools on Steam. + +### Documentation + +Documentation for the API is available on the [Github Wiki](https://github.com/ValveSoftware/openvr/wiki/API-Documentation) + +More information on OpenVR and SteamVR can be found on http://steamvr.com diff --git a/third-party/openvr/bin/osx32/libopenvr_api.dylib b/third-party/openvr/bin/osx32/libopenvr_api.dylib index 095ca48..b3c2569 100644 Binary files a/third-party/openvr/bin/osx32/libopenvr_api.dylib and b/third-party/openvr/bin/osx32/libopenvr_api.dylib differ diff --git a/third-party/openvr/bin/osx64/OpenVR.framework/OpenVR b/third-party/openvr/bin/osx64/OpenVR.framework/OpenVR index 3fb0184..6eef4e3 100644 Binary files a/third-party/openvr/bin/osx64/OpenVR.framework/OpenVR and b/third-party/openvr/bin/osx64/OpenVR.framework/OpenVR differ