diff --git a/src/tabcontrollers/MoveCenterTabController.cpp b/src/tabcontrollers/MoveCenterTabController.cpp index 38c6b04..79e3d36 100644 --- a/src/tabcontrollers/MoveCenterTabController.cpp +++ b/src/tabcontrollers/MoveCenterTabController.cpp @@ -39,8 +39,6 @@ namespace advsettings { void MoveCenterTabController::initStage1() { - m_settingsRightHandDragEnabled = settings::getSetting( - settings::BoolSetting::PLAYSPACE_moveShortcutRight ); m_settingsLeftHandDragEnabled = settings::getSetting( settings::BoolSetting::PLAYSPACE_moveShortcutLeft ); m_settingsLeftHandTurnEnabled @@ -220,10 +218,6 @@ void MoveCenterTabController::deleteOffsetProfile( unsigned index ) void MoveCenterTabController::outputLogSettings() { - if ( m_settingsRightHandDragEnabled ) - { - LOG( INFO ) << "LOADED SETTINGS: Right Hand Space-Drag Bind Enabled"; - } if ( m_settingsLeftHandDragEnabled ) { LOG( INFO ) << "LOADED SETTINGS: Left Hand Space-Drag Bind Enabled"; @@ -608,23 +602,18 @@ void MoveCenterTabController::setAdjustChaperone( bool value, bool notify ) bool MoveCenterTabController::moveShortcutRight() const { - return m_settingsRightHandDragEnabled; + return settings::getSetting( + settings::BoolSetting::PLAYSPACE_moveShortcutRight ); } void MoveCenterTabController::setMoveShortcutRight( bool value, bool notify ) { - m_settingsRightHandDragEnabled = value; - auto settings = OverlayController::appSettings(); - settings->beginGroup( "playspaceSettings" ); - settings->setValue( "moveShortcutRight", m_settingsRightHandDragEnabled ); - settings->endGroup(); - settings->sync(); + settings::setSetting( settings::BoolSetting::PLAYSPACE_moveShortcutRight, + value ); if ( notify ) { - emit moveShortcutRightChanged( m_settingsRightHandDragEnabled ); + emit moveShortcutRightChanged( value ); } - LOG( INFO ) << "CHANGED SETTINGS: Right Hand Space-Drag Bind Enable Set: " - << m_settingsRightHandDragEnabled; } bool MoveCenterTabController::moveShortcutLeft() const @@ -1599,7 +1588,8 @@ void MoveCenterTabController::leftHandSpaceDrag( bool leftHandDragActive ) void MoveCenterTabController::rightHandSpaceDrag( bool rightHandDragActive ) { - if ( !m_settingsRightHandDragEnabled ) + if ( !settings::getSetting( + settings::BoolSetting::PLAYSPACE_moveShortcutRight ) ) { return; } @@ -1705,7 +1695,8 @@ void MoveCenterTabController::optionalOverrideLeftHandSpaceDrag( void MoveCenterTabController::optionalOverrideRightHandSpaceDrag( bool overrideRightHandDragActive ) { - if ( !m_settingsRightHandDragEnabled ) + if ( !settings::getSetting( + settings::BoolSetting::PLAYSPACE_moveShortcutRight ) ) { return; } @@ -1835,7 +1826,8 @@ void MoveCenterTabController::swapSpaceDragToLeftHandOverride( void MoveCenterTabController::swapSpaceDragToRightHandOverride( bool swapDragToRightHand ) { - if ( !m_settingsRightHandDragEnabled ) + if ( !settings::getSetting( + settings::BoolSetting::PLAYSPACE_moveShortcutRight ) ) { return; } diff --git a/src/tabcontrollers/MoveCenterTabController.h b/src/tabcontrollers/MoveCenterTabController.h index aef2e75..c80c9b0 100644 --- a/src/tabcontrollers/MoveCenterTabController.h +++ b/src/tabcontrollers/MoveCenterTabController.h @@ -125,7 +125,6 @@ private: bool m_moveShortcutLeftPressed = false; vr::TrackedDeviceIndex_t m_activeMoveController; float m_lastControllerPosition[3]; - bool m_settingsRightHandDragEnabled = false; bool m_settingsLeftHandDragEnabled = false; bool m_settingsLeftHandTurnEnabled = false; bool m_settingsRightHandTurnEnabled = false;