diff options
Diffstat (limited to 'backends/platform/samsungtv/main.cpp')
-rw-r--r-- | backends/platform/samsungtv/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/backends/platform/samsungtv/main.cpp b/backends/platform/samsungtv/main.cpp index 2c025b750c..f3d868641b 100644 --- a/backends/platform/samsungtv/main.cpp +++ b/backends/platform/samsungtv/main.cpp @@ -34,16 +34,23 @@ extern "C" int Game_Main(char *path, char *) { chdir(path); + // Create OSystem instance g_system = new OSystem_SDL_SamsungTV(); assert(g_system); + // Pre initialize the backend + ((OSystem_SDL_SamsungTV *)g_system)->init(); + #ifdef DYNAMIC_MODULES PluginManager::instance().addPluginProvider(new SDLPluginProvider()); #endif // Invoke the actual ScummVM main entry point: int res = scummvm_main(0, 0); - ((OSystem_SDL *)g_system)->deinit(); + + // Free OSystem + delete (OSystem_SDL_SamsungTV *)g_system; + return res; } |