From 9217472f0e4e801659c0a448dcbf57c28fd36ee2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 2 Apr 2006 14:16:31 +0000 Subject: With this change, backends are now responsible for instantiating their OSystem class before calling scummvm_main (Note: PalmOS and Symbian are not yet converted, and won't work currently) svn-id: r21557 --- backends/ps2/systemps2.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'backends/ps2') diff --git a/backends/ps2/systemps2.cpp b/backends/ps2/systemps2.cpp index d0154ab590..f277648c27 100644 --- a/backends/ps2/systemps2.cpp +++ b/backends/ps2/systemps2.cpp @@ -72,8 +72,6 @@ static int g_MainWaitSema = -1, g_TimerWaitSema = -1; static volatile int32 g_MainWakeUp = 0, g_TimerWakeUp = 0; static volatile uint32 msecCount = 0; -OSystem_PS2 *g_systemPs2 = NULL; - int gBitFormat = 555; #define FOREVER 2147483647 @@ -93,12 +91,6 @@ void sioprintf(const char *zFormat, ...) { sio_puts(resStr); } -OSystem *OSystem_PS2_create(void) { - if (!g_systemPs2) - g_systemPs2 = new OSystem_PS2(); - return g_systemPs2; -} - extern "C" int main(int argc, char *argv[]) { SifInitRpc(0); #ifndef USE_PS2LINK // reset the IOP if this is a CD build @@ -137,7 +129,8 @@ extern "C" int main(int argc, char *argv[]) { sioprintf("Creating system"); /* The OSystem has to be created before we enter ScummVM's main. It sets up the memory card, etc. */ - OSystem_PS2_create(); + g_system = new OSystem_PS2(); + assert(g_system); sioprintf("init done. starting ScummVM."); return scummvm_main(argc, argv); -- cgit v1.2.3