aboutsummaryrefslogtreecommitdiff
path: root/backends/ps2
diff options
context:
space:
mode:
authorMax Horn2006-04-02 14:16:31 +0000
committerMax Horn2006-04-02 14:16:31 +0000
commit9217472f0e4e801659c0a448dcbf57c28fd36ee2 (patch)
treeb880dfbd4a18f93f78931749004c3a4e128f2f59 /backends/ps2
parent72f4a1c76cb8aedf6f953e57090134320d7291b8 (diff)
downloadscummvm-rg350-9217472f0e4e801659c0a448dcbf57c28fd36ee2.tar.gz
scummvm-rg350-9217472f0e4e801659c0a448dcbf57c28fd36ee2.tar.bz2
scummvm-rg350-9217472f0e4e801659c0a448dcbf57c28fd36ee2.zip
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
Diffstat (limited to 'backends/ps2')
-rw-r--r--backends/ps2/systemps2.cpp11
1 files changed, 2 insertions, 9 deletions
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);