diff options
Diffstat (limited to 'backends/plugins/dynamic-plugin.h')
-rw-r--r-- | backends/plugins/dynamic-plugin.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/backends/plugins/dynamic-plugin.h b/backends/plugins/dynamic-plugin.h index 410e21c3a8..67d0b138c6 100644 --- a/backends/plugins/dynamic-plugin.h +++ b/backends/plugins/dynamic-plugin.h @@ -27,27 +27,27 @@ #define BACKENDS_PLUGINS_DYNAMICPLUGIN_H #include "base/plugins.h" -#include "engines/metaengine.h" class DynamicPlugin : public Plugin { protected: typedef void (*VoidFunc)(); - typedef MetaEngine *(*MetaAllocFunc)(); + typedef PluginObject *(*GetObjectFunc)(); virtual VoidFunc findSymbol(const char *symbol) = 0; public: virtual bool loadPlugin() { - // Query the plugin's name - MetaAllocFunc metaAlloc = (MetaAllocFunc)findSymbol("PLUGIN_MetaEngine_alloc"); - if (!metaAlloc) { + // Get the plugin's instantiator object + GetObjectFunc getObject = (GetObjectFunc)findSymbol("PLUGIN_getObject"); + if (!getObject) { unloadPlugin(); return false; } - _metaengine = metaAlloc(); - if (!_metaengine) { + // Get the plugin object + _pluginObject = getObject(); + if (!_pluginObject) { unloadPlugin(); return false; } @@ -56,7 +56,7 @@ public: } virtual void unloadPlugin() { - delete _metaengine; + delete _pluginObject; } }; |