aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorMax Horn2006-10-07 01:05:12 +0000
committerMax Horn2006-10-07 01:05:12 +0000
commitdf5be194098e188f9cd3234af2bea34b67d19da2 (patch)
treee9b797f971d73146f4f9e973168f4fe8bc79bb42 /backends/platform
parentc8a21d19d164d40fc543d3a908789ee249a292fc (diff)
downloadscummvm-rg350-df5be194098e188f9cd3234af2bea34b67d19da2.tar.gz
scummvm-rg350-df5be194098e188f9cd3234af2bea34b67d19da2.tar.bz2
scummvm-rg350-df5be194098e188f9cd3234af2bea34b67d19da2.zip
Instantiate and hook up the plugin providers in the main() function of the corresponding backends (porters may have to update their ports if they were using the POSIX or Win32 module loading code implicitly); some cleanup
svn-id: r24153
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/dc/dcmain.cpp6
-rw-r--r--backends/platform/sdl/sdl.cpp5
-rw-r--r--backends/platform/x11/x11.cpp5
3 files changed, 16 insertions, 0 deletions
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 4b03ec1551..4ba5338dfa 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -31,6 +31,8 @@
#include "DCLauncherDialog.h"
#include <common/config-manager.h>
+#include "backends/plugins/dc/dc-provider.h"
+
Icon icon;
const char *gGameName;
@@ -205,6 +207,10 @@ int main()
g_system = new OSystem_Dreamcast();
assert(g_system);
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new DCPluginProvider());
+#endif
+
int res = scummvm_main(argc, argv);
exit(0);
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 5f76d21c9d..21f5935c58 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -22,6 +22,7 @@
*/
#include "backends/platform/sdl/sdl-common.h"
+#include "backends/plugins/sdl/sdl-provider.h"
#include "common/config-manager.h"
#include "common/util.h"
#include "base/main.h"
@@ -95,6 +96,10 @@ int main(int argc, char *argv[]) {
#endif
assert(g_system);
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
+#endif
+
// Invoke the actual ScummVM main entry point:
int res = scummvm_main(argc, argv);
g_system->quit(); // TODO: Consider removing / replacing this!
diff --git a/backends/platform/x11/x11.cpp b/backends/platform/x11/x11.cpp
index ce020c7a8e..7db5066c44 100644
--- a/backends/platform/x11/x11.cpp
+++ b/backends/platform/x11/x11.cpp
@@ -30,6 +30,7 @@
#include "base/main.h"
#include "backends/intern.h"
#include "backends/platform/x11/x11.h"
+#include "backends/plugins/posix/posix-provider.h"
#include <stdio.h>
#include <assert.h>
@@ -62,6 +63,10 @@ int main(int argc, char *argv[]) {
g_system = OSystem_X11::create(0, 0);
assert(g_system);
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
+#endif
+
// Invoke the actual ScummVM main entry point:
int res = scummvm_main(argc, argv);
g_system->quit(); // TODO: Consider removing / replacing this!