aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/win32
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/sdl/win32')
-rw-r--r--backends/platform/sdl/win32/main.cpp6
-rw-r--r--backends/platform/sdl/win32/win32.cpp6
-rw-r--r--backends/platform/sdl/win32/win32.h2
3 files changed, 14 insertions, 0 deletions
diff --git a/backends/platform/sdl/win32/main.cpp b/backends/platform/sdl/win32/main.cpp
index 6c0508835e..ffabeffc9d 100644
--- a/backends/platform/sdl/win32/main.cpp
+++ b/backends/platform/sdl/win32/main.cpp
@@ -50,13 +50,19 @@ int main(int argc, char *argv[]) {
g_system = new OSystem_Win32();
assert(g_system);
+ // Pre initialize the backend
+ ((OSystem_Win32 *)g_system)->init();
+
#ifdef DYNAMIC_MODULES
PluginManager::instance().addPluginProvider(new SDLPluginProvider());
#endif
// Invoke the actual ScummVM main entry point:
int res = scummvm_main(argc, argv);
+
+ // Free OSystem
delete (OSystem_Win32 *)g_system;
+
return res;
}
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index 0eb4c467b4..4d585add77 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -47,8 +47,14 @@
#define DEFAULT_CONFIG_FILE "scummvm.ini"
OSystem_Win32::OSystem_Win32() {
+}
+
+void OSystem_Win32::init() {
// Initialze File System Factory
_fsFactory = new WindowsFilesystemFactory();
+
+ // Invoke parent implementation of this method
+ OSystem_SDL::init();
}
Common::String OSystem_Win32::getDefaultConfigFileName() {
diff --git a/backends/platform/sdl/win32/win32.h b/backends/platform/sdl/win32/win32.h
index 2bcb0c59b3..eea7f9ee12 100644
--- a/backends/platform/sdl/win32/win32.h
+++ b/backends/platform/sdl/win32/win32.h
@@ -33,6 +33,8 @@ public:
OSystem_Win32();
~OSystem_Win32() {}
+ void init();
+
protected:
Common::String getDefaultConfigFileName();
};