Modified FilePluginProvider to use FSNodes (instead of raw filenames / paths) in its API

svn-id: r34709
This commit is contained in:
Max Horn 2008-09-30 16:34:38 +00:00
parent 1d7de023d9
commit 73b833042e
10 changed files with 34 additions and 25 deletions

View file

@ -27,6 +27,7 @@
#include "backends/plugins/win32/win32-provider.h"
#include "backends/plugins/dynamic-plugin.h"
#include "common/fs.h"
#include <windows.h>
@ -96,12 +97,13 @@ public:
};
Plugin* Win32PluginProvider::createPlugin(const Common::String &filename) const {
return new Win32Plugin(filename);
Plugin* Win32PluginProvider::createPlugin(const Common::FilesystemNode &node) const {
return new Win32Plugin(node.getPath());
}
bool Win32PluginProvider::isPluginFilename(const Common::String &filename) const {
bool Win32PluginProvider::isPluginFilename(const Common::FilesystemNode &node) const {
// Check the plugin suffix
Common::String filename = node.getName();
if (!filename.hasSuffix(".dll"))
return false;