Convert to new paths system

This commit is contained in:
Vasily
2019-03-19 16:10:35 +01:00
committed by username223
parent 62dcea6943
commit d654567d98
4 changed files with 42 additions and 32 deletions
+8 -9
View File
@@ -70,15 +70,14 @@ void AudioTabController::initStage2( OverlayController* var_parent,
notifKey.c_str(), notifKey.c_str(), &m_ulNotificationOverlayHandle );
if ( overlayError == vr::VROverlayError_None )
{
QString notifIconPath = QStandardPaths::locate(
QStandardPaths::AppDataLocation,
QStringLiteral(
"/res/img/audio/microphone/ptt_notification.png" ) );
if ( QFile::exists( notifIconPath ) )
constexpr auto notificationIconFilename
= "/res/img/audio/microphone/ptt_notification.png";
const auto notifIconPath
= paths::binaryDirectoryFindFile( notificationIconFilename );
if ( notifIconPath.has_value() )
{
vr::VROverlay()->SetOverlayFromFile(
m_ulNotificationOverlayHandle,
notifIconPath.toStdString().c_str() );
vr::VROverlay()->SetOverlayFromFile( m_ulNotificationOverlayHandle,
notifIconPath->c_str() );
vr::VROverlay()->SetOverlayWidthInMeters(
m_ulNotificationOverlayHandle, 0.02f );
vr::HmdMatrix34_t notificationTransform
@@ -93,7 +92,7 @@ void AudioTabController::initStage2( OverlayController* var_parent,
else
{
LOG( ERROR ) << "Could not find notification icon \""
<< notifIconPath << "\"";
<< notificationIconFilename << "\"";
}
}
else