mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Show GUI message when game data is not found.
svn-id: r22164
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user