Show GUI message when game data is not found.

svn-id: r22164
This commit is contained in:
Eugene Sandulenko
2006-04-25 23:31:11 +00:00
parent bf53520130
commit d53348797f
2 changed files with 16 additions and 2 deletions
+9 -2
View File
@@ -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;
}
+7
View File
@@ -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;
}