diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/dc/dc.h | 9 | ||||
-rw-r--r-- | backends/platform/dc/dcmain.cpp | 11 |
2 files changed, 13 insertions, 7 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index 9d5e6fcace..0ccd69593e 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -43,7 +43,14 @@ class Interactive #include "softkbd.h" -class OSystem_Dreamcast : public BaseBackend, public FilesystemFactory { +class DCHardware { + private: + static void dc_init_hardware(); + protected: + DCHardware() { dc_init_hardware(); } +}; + +class OSystem_Dreamcast : private DCHardware, public BaseBackend, public FilesystemFactory { public: OSystem_Dreamcast(); diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp index c99b24c435..bdec7f41f1 100644 --- a/backends/platform/dc/dcmain.cpp +++ b/backends/platform/dc/dcmain.cpp @@ -199,7 +199,7 @@ void OSystem_Dreamcast::getTimeAndDate(struct tm &t) const { t = *localtime(&curTime); } -void dc_init_hardware() +void DCHardware::dc_init_hardware() { #ifndef NOSERIAL serial_init(57600); @@ -213,18 +213,17 @@ void dc_init_hardware() init_arm(); } +static OSystem_Dreamcast osys_dc; + int main() { static char *argv[] = { "scummvm", NULL, }; static int argc = 1; - dc_init_hardware(); - - g_system = new OSystem_Dreamcast(); - assert(g_system); + g_system = &osys_dc; #ifdef DYNAMIC_MODULES - PluginManager::instance().addPluginProvider(new DCPluginProvider()); + PluginManager::instance().addPluginProvider(new DCPluginProvider()); #endif int res = scummvm_main(argc, argv); |