aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl/posix/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform/sdl/posix/main.cpp')
-rw-r--r--backends/platform/sdl/posix/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/platform/sdl/posix/main.cpp b/backends/platform/sdl/posix/main.cpp
index cf1bc6ff2f..5f734e6b0e 100644
--- a/backends/platform/sdl/posix/main.cpp
+++ b/backends/platform/sdl/posix/main.cpp
@@ -37,13 +37,19 @@ int main(int argc, char *argv[]) {
g_system = new OSystem_POSIX();
assert(g_system);
+ // Pre initialize the backend
+ ((OSystem_POSIX *)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_POSIX *)g_system;
+
return res;
}