[Scummvm-cvs-logs] SF.net SVN: scummvm: [29496] scummvm/trunk/backends/plugins/win32/ win32-provider.cpp

knakos at users.sourceforge.net knakos at users.sourceforge.net
Tue Nov 13 20:42:52 CET 2007


Revision: 29496
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29496&view=rev
Author:   knakos
Date:     2007-11-13 11:42:52 -0800 (Tue, 13 Nov 2007)

Log Message:
-----------
somewhat more verbose debug msgs

Modified Paths:
--------------
    scummvm/trunk/backends/plugins/win32/win32-provider.cpp

Modified: scummvm/trunk/backends/plugins/win32/win32-provider.cpp
===================================================================
--- scummvm/trunk/backends/plugins/win32/win32-provider.cpp	2007-11-13 19:41:35 UTC (rev 29495)
+++ scummvm/trunk/backends/plugins/win32/win32-provider.cpp	2007-11-13 19:42:52 UTC (rev 29496)
@@ -60,7 +60,7 @@
 		void *func = (void *)GetProcAddress((HMODULE)_dlHandle, toUnicode(symbol));
 		#endif
 		if (!func)
-			warning("Failed loading symbol '%s' from plugin '%s'", symbol, _filename.c_str());
+			debug("Failed loading symbol '%s' from plugin '%s'", symbol, _filename.c_str());
 	
 		// FIXME HACK: This is a HACK to circumvent a clash between the ISO C++
 		// standard and POSIX: ISO C++ disallows casting between function pointers
@@ -81,12 +81,15 @@
 		#ifndef _WIN32_WCE
 		_dlHandle = LoadLibrary(_filename.c_str());
 		#else
-		_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
+		if (!_filename.hasSuffix("scummvm.dll"))	// skip loading the core scummvm module
+			_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
 		#endif
 	
 		if (!_dlHandle) {
-			warning("Failed loading plugin '%s' (error code %d)", _filename.c_str(), GetLastError());
+			debug("Failed loading plugin '%s' (error code %d)", _filename.c_str(), GetLastError());
 			return false;
+		} else {
+			debug(1, "Success loading plugin '%s', handle %08X", _filename.c_str(), _dlHandle);
 		}
 
 		return DynamicPlugin::loadPlugin();
@@ -94,7 +97,9 @@
 	void unloadPlugin() {
 		if (_dlHandle) {
 			if (!FreeLibrary((HMODULE)_dlHandle))
-				warning("Failed unloading plugin '%s'", _filename.c_str());
+				debug("Failed unloading plugin '%s'", _filename.c_str());
+			else
+				debug(1, "Success unloading plugin '%s'", _filename.c_str());
 			_dlHandle = 0;
 		}
 	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list