[vlmc-devel] EffectsEngine: Check and scan for Mac OS, then UNIX based, then windows

Rohit Yadav git at videolan.org
Fri Mar 25 12:20:36 CET 2011


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Fri Mar 25 17:03:17 2011 +0530| [a702b687fd8697d3c0179689de455d128ed3276d] | committer: Rohit Yadav

EffectsEngine: Check and scan for Mac OS, then UNIX based, then windows

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=a702b687fd8697d3c0179689de455d128ed3276d
---

 src/EffectsEngine/EffectsEngine.cpp |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index 8f40bc0..399b908 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -127,7 +127,9 @@ EffectsEngine::loadEffects()
 {
     QStringList     pathList;
 
-#if defined( Q_OS_UNIX )
+#if defined ( QS_OS_MAC )
+    pathList << qApp->applicationDirPath() + "/effects/";
+#elif defined ( Q_OS_UNIX )
     const QProcessEnvironment &env = QProcessEnvironment::systemEnvironment();
     if ( env.contains( "FREI0R_PATH" ) == true )
         pathList = env.value( "FREI0R_PATH" ).split( ':' );
@@ -138,10 +140,8 @@ EffectsEngine::loadEffects()
                     QString("/usr/local/lib/frei0r-1/") <<
                     QString("/usr/lib/frei0r-1/" );
     }
-#else
-    /* Search in the application folder */
+#elif defined ( Q_OS_WIN32 )
     pathList << qApp->applicationDirPath() + "/effects/";
-# if defined ( Q_OS_WIN32 )
     TCHAR       appDir[128];
     if ( GetModuleFileName( NULL, appDir, 128 ) > 0 )
     {
@@ -159,7 +159,6 @@ EffectsEngine::loadEffects()
         qWarning() << "Failed to get application directory. Using current path.";
         pathList << QDir::currentPath() + "/effects/";
     }
-# endif
 #endif
     qDebug() << "Loading effects from:" << pathList;
     foreach ( const QString &path, pathList )



More information about the Vlmc-devel mailing list