WINCE: Change plugin extensions from .dll to .plugin - fixes erroneous loading of runtime-dlls
This commit is contained in:
parent
da3f670898
commit
e27dd8ac4e
2 changed files with 10 additions and 14 deletions
|
@ -67,19 +67,11 @@ public:
|
||||||
|
|
||||||
bool loadPlugin() {
|
bool loadPlugin() {
|
||||||
assert(!_dlHandle);
|
assert(!_dlHandle);
|
||||||
#ifndef _WIN32_WCE
|
#ifndef _WIN32_WCE
|
||||||
_dlHandle = LoadLibrary(_filename.c_str());
|
_dlHandle = LoadLibrary(_filename.c_str());
|
||||||
#else
|
#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()));
|
_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
|
||||||
} else {
|
#endif
|
||||||
// do not generate misleading error message
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!_dlHandle) {
|
if (!_dlHandle) {
|
||||||
debug("Failed loading plugin '%s' (error code %d)", _filename.c_str(), (int32) GetLastError());
|
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 {
|
bool Win32PluginProvider::isPluginFilename(const Common::FSNode &node) const {
|
||||||
// Check the plugin suffix
|
// Check the plugin suffix
|
||||||
Common::String filename = node.getName();
|
Common::String filename = node.getName();
|
||||||
|
#ifndef _WIN32_WCE
|
||||||
if (!filename.hasSuffix(".dll"))
|
if (!filename.hasSuffix(".dll"))
|
||||||
|
#else
|
||||||
|
if (!filename.hasSuffix(".plugin"))
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
4
configure
vendored
4
configure
vendored
|
@ -2324,12 +2324,12 @@ POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-im
|
||||||
HOSTEXEEXT=".dll"
|
HOSTEXEEXT=".dll"
|
||||||
_def_plugin='
|
_def_plugin='
|
||||||
#define PLUGIN_PREFIX ""
|
#define PLUGIN_PREFIX ""
|
||||||
#define PLUGIN_SUFFIX ".dll"
|
#define PLUGIN_SUFFIX ".plugin"
|
||||||
'
|
'
|
||||||
_mak_plugins='
|
_mak_plugins='
|
||||||
DYNAMIC_MODULES := 1
|
DYNAMIC_MODULES := 1
|
||||||
PLUGIN_PREFIX :=
|
PLUGIN_PREFIX :=
|
||||||
PLUGIN_SUFFIX := .dll
|
PLUGIN_SUFFIX := .plugin
|
||||||
PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
|
PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
|
||||||
CXXFLAGS += -DDYNAMIC_MODULES
|
CXXFLAGS += -DDYNAMIC_MODULES
|
||||||
PLUGIN_LDFLAGS := -shared -lscummvm -L.
|
PLUGIN_LDFLAGS := -shared -lscummvm -L.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue