WINCE: Change plugin extensions from .dll to .plugin - fixes erroneous loading of runtime-dlls

This commit is contained in:
CeRiAl 2011-05-20 06:20:52 +08:00 committed by Ismail Khatib
parent da3f670898
commit e27dd8ac4e
2 changed files with 10 additions and 14 deletions

View file

@ -67,19 +67,11 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
#ifndef _WIN32_WCE
#ifndef _WIN32_WCE
_dlHandle = LoadLibrary(_filename.c_str());
#else
if (!_filename.hasSuffix("scummvm.dll") &&
!_filename.hasSuffix("libstdc++-6.dll") &&
!_filename.hasSuffix("libgcc_s_sjlj-1.dll")) {
// skip loading the core scummvm module and runtime dlls
_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
} else {
// do not generate misleading error message
return false;
}
#endif
#else
_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
#endif
if (!_dlHandle) {
debug("Failed loading plugin '%s' (error code %d)", _filename.c_str(), (int32) GetLastError());
@ -111,7 +103,11 @@ Plugin* Win32PluginProvider::createPlugin(const Common::FSNode &node) const {
bool Win32PluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
Common::String filename = node.getName();
#ifndef _WIN32_WCE
if (!filename.hasSuffix(".dll"))
#else
if (!filename.hasSuffix(".plugin"))
#endif
return false;
return true;