diff --git a/Readme.md b/Readme.md index a96964f..269b5fc 100644 --- a/Readme.md +++ b/Readme.md @@ -23,6 +23,7 @@ > * [Motion Page](#motion_page) > * [Space Fix Page](#space_fix_page) > * [Audio Page](#audio_page) + > * [Video Page](#video_page) > * [Utilities Page](#utilities_page) > * [Desktop Overlay Page](#desktop_overlay_page) > * [Statistics Page](#statistics_page) @@ -317,6 +318,15 @@ Allows users to temporarily move and rotate the center of the playspace. This al - **NOTE**: The Push-to-talk box must be enabled for this feature to work. - **Audio Profile**: Allows you to apply/define/delete audio profiles that save playback devices, mute state, and volume. + +## - Video Page: + +![Video Page](docs/screenshots/VideoPage.png) + +- **Brightness**: Allows Dimming of your view. + - **On/Off**: Toggles The Dimming on/off. + - **Brightness**: The amount of dimming. + - **Note**: Does not necessarily reduce light output of HMD will vary based on panel type etc. ## - Utilities Page: diff --git a/docs/screenshots/InVRScreenshot.png b/docs/screenshots/InVRScreenshot.png index d9a36fa..f8e562c 100644 Binary files a/docs/screenshots/InVRScreenshot.png and b/docs/screenshots/InVRScreenshot.png differ diff --git a/docs/screenshots/RootPage.png b/docs/screenshots/RootPage.png index 4ed29c1..3dbf166 100644 Binary files a/docs/screenshots/RootPage.png and b/docs/screenshots/RootPage.png differ diff --git a/docs/screenshots/SettingsPage.png b/docs/screenshots/SettingsPage.png index c1a0e3a..88fb177 100644 Binary files a/docs/screenshots/SettingsPage.png and b/docs/screenshots/SettingsPage.png differ diff --git a/docs/screenshots/VideoPage.png b/docs/screenshots/VideoPage.png new file mode 100644 index 0000000..44d3b41 Binary files /dev/null and b/docs/screenshots/VideoPage.png differ diff --git a/src/res/qml/video_page/brightness/BrightnessGroupBox.qml b/src/res/qml/video_page/brightness/BrightnessGroupBox.qml index ecc2e0f..a1a12ff 100644 --- a/src/res/qml/video_page/brightness/BrightnessGroupBox.qml +++ b/src/res/qml/video_page/brightness/BrightnessGroupBox.qml @@ -84,7 +84,7 @@ GroupBox { var v = (val/100).toFixed(2) brightnessSlider.value = v } - text = Math.round(VideoTabController.boundsVisibility * 100) + "%" + text = Math.round(VideoTabController.brightnessValue * 100) + "%" } } } diff --git a/src/tabcontrollers/VideoTabController.cpp b/src/tabcontrollers/VideoTabController.cpp index 6f1987b..e0766c2 100644 --- a/src/tabcontrollers/VideoTabController.cpp +++ b/src/tabcontrollers/VideoTabController.cpp @@ -18,25 +18,23 @@ void VideoTabController::initStage2( OverlayController* var_parent, + ".dimnotification"; vr::VROverlayError overlayError = vr::VROverlay()->CreateOverlay( - notifKey.c_str(), - notifKey.c_str(), - &m_brightnessNotificationOverlayHandle ); + notifKey.c_str(), notifKey.c_str(), &m_brightnessOverlayHandle ); if ( overlayError == vr::VROverlayError_None ) { const auto notifIconPath = paths::binaryDirectoryFindFile( video_keys::k_brightnessOverlayFilename ); if ( notifIconPath.has_value() ) { - vr::VROverlay()->SetOverlayFromFile( - m_brightnessNotificationOverlayHandle, notifIconPath->c_str() ); - vr::VROverlay()->SetOverlayWidthInMeters( - m_brightnessNotificationOverlayHandle, k_overlayWidth ); + vr::VROverlay()->SetOverlayFromFile( m_brightnessOverlayHandle, + notifIconPath->c_str() ); + vr::VROverlay()->SetOverlayWidthInMeters( m_brightnessOverlayHandle, + k_overlayWidth ); vr::HmdMatrix34_t notificationTransform = { { { 1.0f, 0.0f, 0.0f, 0.00f }, { 0.0f, 1.0f, 0.0f, 0.00f }, { 0.0f, 0.0f, 1.0f, k_hmdDistance } } }; vr::VROverlay()->SetOverlayTransformTrackedDeviceRelative( - m_brightnessNotificationOverlayHandle, + m_brightnessOverlayHandle, vr::k_unTrackedDeviceIndex_Hmd, ¬ificationTransform ); } @@ -100,9 +98,10 @@ void VideoTabController::setBrightnessEnabled( bool value, bool notify ) if ( value != m_brightnessEnabled ) { m_brightnessEnabled = value; + auto overlayHandle = getBrightnessOverlayHandle(); if ( value ) { - if ( getBrightnessOverlayHandle() != vr::k_ulOverlayHandleInvalid ) + if ( overlayHandle != vr::k_ulOverlayHandleInvalid ) { vr::VROverlay()->ShowOverlay( getBrightnessOverlayHandle() ); LOG( INFO ) << "Brightness Overlay toggled on"; @@ -110,7 +109,7 @@ void VideoTabController::setBrightnessEnabled( bool value, bool notify ) } else { - if ( getBrightnessOverlayHandle() != vr::k_ulOverlayHandleInvalid ) + if ( overlayHandle != vr::k_ulOverlayHandleInvalid ) { vr::VROverlay()->HideOverlay( getBrightnessOverlayHandle() ); LOG( INFO ) << "Brightness Overlay toggled off"; @@ -138,7 +137,7 @@ void VideoTabController::setBrightnessValue( float percvalue, bool notify ) { m_opacityValue = realvalue; vr::VROverlayError overlayError = vr::VROverlay()->SetOverlayAlpha( - m_brightnessNotificationOverlayHandle, realvalue ); + m_brightnessOverlayHandle, realvalue ); if ( overlayError != vr::VROverlayError_None ) { LOG( ERROR ) << "Could not set alpha: " @@ -164,7 +163,7 @@ void VideoTabController::setBrightnessValue( float percvalue, bool notify ) void VideoTabController::setOpacityValue() { vr::VROverlayError overlayError = vr::VROverlay()->SetOverlayAlpha( - m_brightnessNotificationOverlayHandle, m_opacityValue ); + m_brightnessOverlayHandle, m_opacityValue ); if ( overlayError != vr::VROverlayError_None ) { LOG( ERROR ) << "Could not set alpha: " diff --git a/src/tabcontrollers/VideoTabController.h b/src/tabcontrollers/VideoTabController.h index 2506a1d..6fede2b 100644 --- a/src/tabcontrollers/VideoTabController.h +++ b/src/tabcontrollers/VideoTabController.h @@ -34,7 +34,7 @@ private: OverlayController* parent; QQuickWindow* widget; - vr::VROverlayHandle_t m_brightnessNotificationOverlayHandle + vr::VROverlayHandle_t m_brightnessOverlayHandle = vr::k_ulOverlayHandleInvalid; float m_opacityValue = 0.0f; float m_brightnessValue = 1.0f; @@ -51,7 +51,7 @@ private: vr::VROverlayHandle_t getBrightnessOverlayHandle() { - return m_brightnessNotificationOverlayHandle; + return m_brightnessOverlayHandle; } public: