[vlmc-devel] commit: EffectsEngine: Blind fix for Win32 effects loading. ( =?UTF-8?Q?Hugo=20Beauz=C3=A9e=2DLuyssen?==?UTF-8?Q?=20?=)
git at videolan.org
git at videolan.org
Wed Dec 29 17:01:41 CET 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Dec 29 16:59:43 2010 +0100| [0e673e1f8209565b9f30d5575839c1f2ac2f3c7f] | committer: Hugo Beauzée-Luyssen
EffectsEngine: Blind fix for Win32 effects loading.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=0e673e1f8209565b9f30d5575839c1f2ac2f3c7f
---
src/EffectsEngine/EffectsEngine.cpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index 14cb603..1494550 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -140,7 +140,16 @@ EffectsEngine::loadEffects()
#elif defined ( Q_OS_WIN32 )
TCHAR appDir[128];
if ( GetModuleFileName( NULL, appDir, 128 ) > 0 )
+ {
+ wchat_t *pos = wcsrchr( appDir, '\\' );
+ if ( pos == NULL )
+ {
+ qWarning() << "Can't use ModuleFileName:" << appDir;
+ return ;
+ }
+ *pos = 0;
pathList << QString( appDir );
+ }
else
{
qWarning() << "Failed to get application directory. Using current path.";
More information about the Vlmc-devel
mailing list