Backends now are also responsile for deiniting properly. In particular, moved the call to quit() from scummvm_main to the various backend main routines (porters may want to replace it by something different)
svn-id: r21559
This commit is contained in:
parent
9217472f0e
commit
e9bc5ba280
11 changed files with 40 additions and 19 deletions
|
@ -206,7 +206,7 @@ int main()
|
|||
g_system = new OSystem_Dreamcast();
|
||||
assert(g_system);
|
||||
|
||||
scummvm_main(argc, argv);
|
||||
int res = scummvm_main(argc, argv);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
|
|
@ -74,5 +74,8 @@ void GpMain(void *arg) {
|
|||
g_system = new OSystem_GP32_create();
|
||||
assert(g_system);
|
||||
|
||||
scummvm_main(1, NULL);
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
int res = scummvm_main(1, NULL);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -68,12 +68,14 @@ int main(int argc, char *argv[]) {
|
|||
g_system = new OSystem_SDL();
|
||||
assert(g_system);
|
||||
|
||||
scummvm_main(argc, argv);
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
int res = scummvm_main(argc, argv);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
|
||||
/* Deinitialize OSSO */
|
||||
//osso_deinitialize(osso_context);
|
||||
|
||||
set_doubling(0);
|
||||
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -437,6 +437,9 @@ int main()
|
|||
g_system = OSystem_MorphOS_create();
|
||||
assert(g_system);
|
||||
|
||||
return scummvm_main(argc, argv);
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
int res = scummvm_main(argc, argv);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,10 +107,13 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
|
|||
};
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
g_system = OSystem_NULL_create();
|
||||
assert(g_system);
|
||||
return scummvm_main(argc, argv);
|
||||
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
int res = scummvm_main(argc, argv);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
return res;
|
||||
}
|
||||
|
||||
OSystem_NULL::OSystem_NULL()
|
||||
|
|
|
@ -133,7 +133,9 @@ extern "C" int main(int argc, char *argv[]) {
|
|||
assert(g_system);
|
||||
|
||||
sioprintf("init done. starting ScummVM.");
|
||||
return scummvm_main(argc, argv);
|
||||
int res = scummvm_main(argc, argv);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
return res;
|
||||
}
|
||||
|
||||
s32 timerInterruptHandler(s32 cause) {
|
||||
|
|
|
@ -147,10 +147,12 @@ int main(void)
|
|||
g_system = OSystem_PSP_create();
|
||||
assert(g_system);
|
||||
|
||||
scummvm_main(argc, argv);
|
||||
int res = scummvm_main(argc, argv);
|
||||
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
|
||||
sceKernelSleepThread();
|
||||
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,12 +91,14 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
#endif // defined(__SYMBIAN32__)
|
||||
|
||||
|
||||
// Create our OSystem instance
|
||||
g_system = new OSystem_SDL();
|
||||
assert(g_system);
|
||||
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
return scummvm_main(argc, argv);
|
||||
int res = scummvm_main(argc, argv);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -146,15 +146,20 @@ int SDL_main(int argc, char **argv) {
|
|||
stderr_file = fopen("\\scummvm_stderr.txt", "w");
|
||||
GUI::Actions::init(_gameDetector);
|
||||
|
||||
int rest = 0;
|
||||
|
||||
__try {
|
||||
g_system = OSystem_WINCE3_create();
|
||||
assert(g_system);
|
||||
return scummvm_main(_gameDetector, argc, argv);
|
||||
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
res = scummvm_main(argc, argv);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
}
|
||||
__except (handleException(GetExceptionInformation())) {
|
||||
}
|
||||
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
// ********************************************************************************************
|
||||
|
|
|
@ -63,7 +63,9 @@ int main(int argc, char *argv[]) {
|
|||
assert(g_system);
|
||||
|
||||
// Invoke the actual ScummVM main entry point:
|
||||
return scummvm_main(argc, argv);
|
||||
int res = scummvm_main(argc, argv);
|
||||
g_system->quit(); // TODO: Consider removing / replacing this!
|
||||
return res;
|
||||
}
|
||||
|
||||
OSystem *OSystem_X11::create(int gfx_mode, bool full_screen) {
|
||||
|
|
|
@ -398,11 +398,8 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
|
|||
running = launcherDialog(detector, system);
|
||||
}
|
||||
|
||||
// ...and quit (the return 0 should never be reached)
|
||||
// Deinit the timer
|
||||
delete Common::g_timer;
|
||||
system.quit();
|
||||
|
||||
error("If you are seeing this, your OSystem backend is not working properly");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue