aboutsummaryrefslogtreecommitdiff
path: root/scumm/scummvm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/scummvm.cpp')
-rw-r--r--scumm/scummvm.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index a5d2805218..e8f9dcf8cc 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -327,6 +327,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_optionsDialog = NULL;
_mainMenuDialog = NULL;
_confirmExitDialog = NULL;
+ _confirmRestartDialog = NULL;
_fastMode = 0;
_actors = NULL;
_inventory = NULL;
@@ -862,6 +863,7 @@ ScummEngine::~ScummEngine() {
delete _optionsDialog;
delete _mainMenuDialog;
delete _confirmExitDialog;
+ delete _confirmRestartDialog;
delete _sound;
if (_musicEngine) {
@@ -1844,7 +1846,7 @@ void ScummEngine::processKbd() {
#endif
if (VAR_RESTART_KEY != 0xFF && _lastKeyHit == VAR(VAR_RESTART_KEY)) {
- restart();
+ confirmrestartDialog();
return;
}
@@ -2583,6 +2585,15 @@ void ScummEngine::confirmexitDialog() {
}
}
+void ScummEngine::confirmrestartDialog() {
+ if (!_confirmRestartDialog)
+ _confirmRestartDialog = new ConfirmRestartDialog(this);
+
+ if (runDialog(*_confirmRestartDialog)) {
+ restart();
+ }
+}
+
char ScummEngine::displayError(bool showCancel, const char *message, ...) {
#ifdef __PALM_OS__
char buf[256]; // 1024 is too big overflow the stack