[vlmc-devel] commit: EffectsEngine: Handle effect path on win32 ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Tue Sep 7 16:54:37 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Sep  7 16:25:27 2010 +0200| [5c2693bb288626e9e35a4d9a32be36c5deab15e3] | committer: Hugo Beauzée-Luyssen 

EffectsEngine: Handle effect path on win32

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

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

diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index 940bd0c..9d79d7a 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -119,18 +119,21 @@ EffectsEngine::browseDirectory( const QString &path )
 void
 EffectsEngine::loadEffects()
 {
-    //FIXME: What should we do for windows ?!
+    QStringList     pathList;
+
+#if defined( Q_OS_UNIX )
     //Refer to http://www.piksel.org/frei0r/1.2/spec/group__pluglocations.html
-    const   QString paths[3] = {
-        QString( QDir::homePath() + "/.frei0r-1/lib/" ),
-        QString("/usr/local/lib/frei0r-1/"),
-        QString("/usr/lib/frei0r-1/" )
-    };
-    for ( quint32 i = 0; i < 3; ++i )
+    pathList << QString( QDir::homePath() + "/.frei0r-1/lib/" ) <<
+                QString("/usr/local/lib/frei0r-1/") <<
+                QString("/usr/lib/frei0r-1/" );
+#elif defined ( Q_OS_WIN32 )
+    pathList << QDir::currentPath();
+#endif
+    foreach ( const QString &path, pathList )
     {
-        if ( QFile::exists( paths[i] ) == true )
+        if ( QFile::exists( path ) == true )
         {
-            browseDirectory( paths[i] );
+            browseDirectory( path );
         }
     }
 }



More information about the Vlmc-devel mailing list