aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-05-29 16:01:56 +0200
committerWillem Jan Palenstijn2011-05-29 16:01:56 +0200
commit59dd072f63cfad3c9a251b9033dcf88377c4778c (patch)
tree6de3bef0636603685c2b8c9429b3d9aafde1cd29 /engines/sci
parent4b98d6a9e44e2868cf6f4c7d32f9ab291b542eae (diff)
downloadscummvm-rg350-59dd072f63cfad3c9a251b9033dcf88377c4778c.tar.gz
scummvm-rg350-59dd072f63cfad3c9a251b9033dcf88377c4778c.tar.bz2
scummvm-rg350-59dd072f63cfad3c9a251b9033dcf88377c4778c.zip
SCI: Make 'quit' an alias for 'quit game' in the console
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/console.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index ac87b3f6f6..af945247ba 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -3362,20 +3362,22 @@ bool Console::cmdSfx01Track(int argc, const char **argv) {
bool Console::cmdQuit(int argc, const char **argv) {
if (argc != 2) {
- DebugPrintf("%s game - exit gracefully\n", argv[0]);
- DebugPrintf("%s now - exit ungracefully\n", argv[0]);
- return true;
}
- if (!scumm_stricmp(argv[1], "game")) {
+ if (argc == 2 && !scumm_stricmp(argv[1], "now")) {
+ // Quit ungracefully
+ g_system->quit();
+ } else if (argc == 1 || (argc == 2 && !scumm_stricmp(argv[1], "game"))) {
+
// Quit gracefully
_engine->_gamestate->abortScriptProcessing = kAbortQuitGame; // Terminate VM
_debugState.seeking = kDebugSeekNothing;
_debugState.runningStep = 0;
- } else if (!scumm_stricmp(argv[1], "now")) {
- // Quit ungracefully
- g_system->quit();
+ } else {
+ DebugPrintf("%s [game] - exit gracefully\n", argv[0]);
+ DebugPrintf("%s now - exit ungracefully\n", argv[0]);
+ return true;
}
return Cmd_Exit(0, 0);