From d53348797fe32ce9685a97ebca374bd08e37ea7d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 25 Apr 2006 23:31:11 +0000 Subject: [PATCH] Show GUI message when game data is not found. svn-id: r22164 --- engines/saga/saga.cpp | 11 +++++++++-- engines/simon/simon.cpp | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 2a8f0e18020..cec8e3a9395 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -53,6 +53,8 @@ #include "saga/objectmap.h" #include "saga/resnames.h" +#include "gui/message.h" + namespace Saga { #define MAX_TIME_DELTA 100 @@ -158,10 +160,15 @@ int SagaEngine::init() { _resource = new Resource(this); - // Process command line - // Detect game and open resource files if (!initGame()) { + _system->beginGFXTransaction(); + initCommonGFX(false); + _system->initSize(320, 200, 2); + _system->endGFXTransaction(); + GUI::MessageDialog dialog("No valid games were found in the specified directory."); + dialog.runModal(); + return FAILURE; } diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index 781915ccb5d..26fa3f80253 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -404,6 +404,13 @@ int SimonEngine::init() { // Detect game if (!initGame()) { + _system->beginGFXTransaction(); + initCommonGFX(false); + _system->initSize(320, 200, 2); + _system->endGFXTransaction(); + GUI::MessageDialog dialog("No valid games were found in the specified directory."); + dialog.runModal(); + return -1; }