diff options
author | Jordi Vilalta Prat | 2008-05-13 13:24:49 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2008-05-13 13:24:49 +0000 |
commit | a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335 (patch) | |
tree | 7f44a8a4491bce8929015d5c070c971ac8bf8502 /backends | |
parent | f7a682edf9c2c9a50cba9b869f447a9781def64b (diff) | |
download | scummvm-rg350-a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335.tar.gz scummvm-rg350-a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335.tar.bz2 scummvm-rg350-a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335.zip |
Taken care of FilePluginProvider's FIXMEs
svn-id: r32085
Diffstat (limited to 'backends')
-rw-r--r-- | backends/plugins/dc/dc-provider.cpp | 10 | ||||
-rw-r--r-- | backends/plugins/dc/dc-provider.h | 3 | ||||
-rw-r--r-- | backends/plugins/win32/win32-provider.cpp | 8 | ||||
-rw-r--r-- | backends/plugins/win32/win32-provider.h | 3 |
4 files changed, 19 insertions, 5 deletions
diff --git a/backends/plugins/dc/dc-provider.cpp b/backends/plugins/dc/dc-provider.cpp index 1cae4bbd32..9b150c8db4 100644 --- a/backends/plugins/dc/dc-provider.cpp +++ b/backends/plugins/dc/dc-provider.cpp @@ -83,9 +83,17 @@ public: }; -Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const { +Plugin* DCPluginProvider::createPlugin(const Common::String &filename) const { return new DCPlugin(filename); } +bool DCPluginProvider::isPluginFilename(const Common::String &filename) const { + // Check the plugin suffix + if (!filename.hasSuffix(".PLG")) + return false; + + return true; +} + #endif // defined(DYNAMIC_MODULES) && defined(__DC__) diff --git a/backends/plugins/dc/dc-provider.h b/backends/plugins/dc/dc-provider.h index 1b96f55d4d..f413061828 100644 --- a/backends/plugins/dc/dc-provider.h +++ b/backends/plugins/dc/dc-provider.h @@ -34,8 +34,7 @@ class DCPluginProvider : public FilePluginProvider { protected: Plugin* createPlugin(const Common::String &filename) const; - virtual const char* getPrefix() const { return ""; } - virtual const char* getSuffix() const { return ".PLG"; } + bool isPluginFilename(const Common::String &filename) const; virtual void addCustomDirectories(Common::StringList &dirs) const { dirs.push_back("/"); diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp index 0592638140..64636d8096 100644 --- a/backends/plugins/win32/win32-provider.cpp +++ b/backends/plugins/win32/win32-provider.cpp @@ -107,5 +107,13 @@ Plugin* Win32PluginProvider::createPlugin(const Common::String &filename) const return new Win32Plugin(filename); } +bool Win32PluginProvider::isPluginFilename(const Common::String &filename) const { + // Check the plugin suffix + if (!filename.hasSuffix(".dll")) + return false; + + return true; +} + #endif // defined(DYNAMIC_MODULES) && defined(_WIN32) diff --git a/backends/plugins/win32/win32-provider.h b/backends/plugins/win32/win32-provider.h index e4b0be7395..4ddc8b7500 100644 --- a/backends/plugins/win32/win32-provider.h +++ b/backends/plugins/win32/win32-provider.h @@ -34,8 +34,7 @@ class Win32PluginProvider : public FilePluginProvider { protected: Plugin* createPlugin(const Common::String &filename) const; - virtual const char* getPrefix() const { return ""; } - virtual const char* getSuffix() const { return ".dll"; } + bool isPluginFilename(const Common::String &filename) const; virtual void addCustomDirectories(Common::StringList &dirs) const {} }; |