[Scummvm-cvs-logs] scummvm master -> f3251b5bb65bbd4ecee7a0700e1f876987cc7644

eriktorbjorn eriktorbjorn at telia.com
Mon Apr 6 08:31:16 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f3251b5bb6 MADS: Allow quitting in Rex's copy protection dialog


Commit: f3251b5bb65bbd4ecee7a0700e1f876987cc7644
    https://github.com/scummvm/scummvm/commit/f3251b5bb65bbd4ecee7a0700e1f876987cc7644
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-04-06T08:29:46+02:00

Commit Message:
MADS: Allow quitting in Rex's copy protection dialog

Changed paths:
    engines/mads/nebular/dialogs_nebular.cpp
    engines/mads/nebular/game_nebular.cpp



diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index 9388aa2..731e7e9 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -439,10 +439,13 @@ void CopyProtectionDialog::show() {
 	_vm->_screen.updateScreen();
 
 	while (!_vm->shouldQuit()) {
-		while (!_vm->_events->isKeyPressed()) {
+		while (!_vm->shouldQuit() && !_vm->_events->isKeyPressed()) {
 			_vm->_events->delay(1);
 		}
 
+		if (_vm->shouldQuit())
+			break;
+
 		curKey = _vm->_events->getKey();
 		
 		if (curKey.keycode == Common::KEYCODE_RETURN || curKey.keycode == Common::KEYCODE_KP_ENTER)
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index ec7c667..c96f1c6 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -56,7 +56,7 @@ ProtectionResult GameNebular::checkCopyProtection() {
 	correctAnswer = dlg->isCorrectAnswer();
 	delete dlg;
 
-	if (!correctAnswer) {
+	if (!correctAnswer && !_vm->shouldQuit()) {
 		dlg = new CopyProtectionDialog(_vm, true);
 		dlg->show();
 		correctAnswer = dlg->isCorrectAnswer();






More information about the Scummvm-git-logs mailing list