diff options
| -rw-r--r-- | gui/dialog.cpp | 6 | ||||
| -rw-r--r-- | gui/gui.cpp | 2 | ||||
| -rw-r--r-- | scumm/debug.cpp | 2 | ||||
| -rw-r--r-- | scumm/scummvm.cpp | 2 | 
4 files changed, 7 insertions, 5 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 2d155690dc..b2c5473383 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -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); diff --git a/gui/gui.cpp b/gui/gui.cpp index 96c74fd469..1eee1e8021 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -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; diff --git a/scumm/debug.cpp b/scumm/debug.cpp index 2ee1878678..22c46d003d 100644 --- a/scumm/debug.cpp +++ b/scumm/debug.cpp @@ -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"); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 499e9bab27..59189d5328 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -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, ...)  | 
