Replace some exit()'s with a call to the OSystem quit method, as per 610251.

svn-id: r4956
This commit is contained in:
James Brown 2002-09-17 04:52:50 +00:00
parent e4ce428bdd
commit 79857fd7e8
4 changed files with 7 additions and 5 deletions

View File

@ -373,8 +373,10 @@ void SaveLoadDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
case kOptionsCmd:
_gui->optionsDialog();
break;
case kQuitCmd:
exit(1);
case kQuitCmd: {
Scumm *s = _gui->getScumm();
s->_system->quit();
}
break;
default:
Dialog::handleCommand(sender, cmd, data);

View File

@ -862,7 +862,7 @@ void Gui::handleCommand(int cmd)
#ifdef _WIN32_WCE
do_quit();
#endif
exit(1);
_s->_system->quit();
return;
case 7: /* cancel button */
_cur_page = 0;

View File

@ -140,7 +140,7 @@ bool ScummDebugger::do_command()
}
return true;
case CMD_QUIT:
exit(1);
_s->_system->quit();
default: /* this line is never reached */
error("Unknown debug command");

View File

@ -1261,7 +1261,7 @@ void NORETURN CDECL error(const char *s, ...)
#endif
}
// Doesn't wait for any keypress!! Is it intended to?
exit(1);
g_scumm->_system->quit();
}
void CDECL warning(const char *s, ...)