diff options
author | Max Horn | 2006-04-29 00:27:20 +0000 |
---|---|---|
committer | Max Horn | 2006-04-29 00:27:20 +0000 |
commit | bf7359881115a5b041028b032ee28430bc5e36d3 (patch) | |
tree | 78c955620bb16d4b4e39f3b887eed35dd552c57b /base/main.cpp | |
parent | b00262a2fe1b8bf1d51794a9da3e735e97dfb5ee (diff) | |
download | scummvm-rg350-bf7359881115a5b041028b032ee28430bc5e36d3.tar.gz scummvm-rg350-bf7359881115a5b041028b032ee28430bc5e36d3.tar.bz2 scummvm-rg350-bf7359881115a5b041028b032ee28430bc5e36d3.zip |
* Changed the createEngine() factory function of our plugins to return an error code (the engine is now passed indirectly via a double pointer)
* Removed Engine_Empty (obsolete now that engines can return actual error codes)
svn-id: r22199
Diffstat (limited to 'base/main.cpp')
-rw-r--r-- | base/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/base/main.cpp b/base/main.cpp index 409a42ad9d..2a46357af4 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -180,9 +180,11 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String & } // Create the game engine - Engine *engine = plugin->createInstance(&system); - if (!engine) { + Engine *engine = 0; + PluginError err = plugin->createInstance(&system, &engine); + if (!engine || err != kNoError) { // TODO: Show an error dialog or so? + // TODO: Also take 'err' into consideration... //GUI::MessageDialog alert("ScummVM could not find any game in the specified directory!"); //alert.runModal(); warning("Failed to instantiate engine for target %s", ConfMan.getActiveDomainName().c_str()); |