From 2694e916dacd46641831fdaba600641212e9bbe2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 3 Nov 2008 21:10:18 +0000 Subject: Extend HACK in Engine::hasFeature, fixes GMM load dialog. svn-id: r34889 --- engines/engine.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 4bbe2d069f..7c251cbe1f 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -288,7 +288,9 @@ bool Engine::shouldQuit() const { bool Engine::hasFeature(EngineFeature f) { // TODO: Get rid of this hack!!! - if (f != kSupportsRTL) + if (f != kSupportsRTL && f != kSupportsListSaves && + f != kSupportsLoadingDuringRuntime && + f != kSupportsSavingDuringRuntime) return false; const EnginePlugin *plugin = 0; @@ -296,6 +298,15 @@ bool Engine::hasFeature(EngineFeature f) { gameid.toLowercase(); EngineMan.findGame(gameid, &plugin); assert(plugin); - return ( (*plugin)->hasFeature(MetaEngine::kSupportsRTL) ); + if (f == kSupportsRTL) + return (*plugin)->hasFeature(MetaEngine::kSupportsRTL); + else if (f == kSupportsListSaves) + return (*plugin)->hasFeature(MetaEngine::kSupportsListSaves); + else if (f == kSupportsLoadingDuringRuntime) + return (*plugin)->hasFeature(MetaEngine::kSupportsLoadingDuringRuntime); + else if (f == kSupportsSavingDuringRuntime) + return (*plugin)->hasFeature(MetaEngine::kSupportsSavingDuringRuntime); + else + return false; } -- cgit v1.2.3