aboutsummaryrefslogtreecommitdiff
path: root/backends/plugins/win32
diff options
context:
space:
mode:
authorKostas Nakos2007-11-13 19:42:52 +0000
committerKostas Nakos2007-11-13 19:42:52 +0000
commit2ae1c3c4965ff157f9f3232eec8173b0acddf3a3 (patch)
tree0e8803d5c56111946cb142736e404c9b02b93c91 /backends/plugins/win32
parent323cb4827f1a51ce92d2bc3479420104db144e82 (diff)
downloadscummvm-rg350-2ae1c3c4965ff157f9f3232eec8173b0acddf3a3.tar.gz
scummvm-rg350-2ae1c3c4965ff157f9f3232eec8173b0acddf3a3.tar.bz2
scummvm-rg350-2ae1c3c4965ff157f9f3232eec8173b0acddf3a3.zip
somewhat more verbose debug msgs
svn-id: r29496
Diffstat (limited to 'backends/plugins/win32')
-rw-r--r--backends/plugins/win32/win32-provider.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp
index 06855e16bb..85402c8cb8 100644
--- a/backends/plugins/win32/win32-provider.cpp
+++ b/backends/plugins/win32/win32-provider.cpp
@@ -60,7 +60,7 @@ protected:
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 @@ public:
#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 @@ public:
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;
}
}