ALL: sync with scummvm

This commit is contained in:
Pawel Kolodziejski 2011-06-09 11:17:15 +02:00
parent 0c962164d4
commit 7329a5d164
126 changed files with 2443 additions and 1679 deletions

View file

@ -31,6 +31,7 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one...
class Win32Plugin : public DynamicPlugin {
@ -67,19 +68,11 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
#ifndef _WIN32_WCE
#ifndef _WIN32_WCE
_dlHandle = LoadLibrary(_filename.c_str());
#else
if (!_filename.hasSuffix("residual.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 +104,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;