From 6e5b70f5e9f8690b467ea8837e727e1048838788 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 12 Jun 2007 12:22:25 +0000 Subject: Patch #1733764: "Fallback detection patch". GSoC student. svn-id: r27375 --- engines/agos/detection.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/agos/detection.cpp') diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index ab5bb4a2de..138be5b1d2 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -117,7 +117,8 @@ PluginError Engine_AGOS_create(OSystem *syst, Engine **engine) { assert(engine); const char *gameid = ConfMan.get("gameid").c_str(); - //const AGOSGameDescription gd = (const AGOSGameDescription *)Common::AdvancedDetector::detectBestMatchingGame(detectionParams); + //Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); + //const AGOSGameDescription *gd = (const AGOSGameDescription *)(encapsulatedDesc.realDesc); //if (gd == 0) { // return kNoGameDataFoundError; //} @@ -154,7 +155,9 @@ REGISTER_PLUGIN(AGOS, "AGOS", "AGOS (C) Adventure Soft"); namespace AGOS { bool AGOSEngine::initGame() { - _gameDescription = (const AGOSGameDescription *)Common::AdvancedDetector::detectBestMatchingGame(detectionParams); + Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); + _gameDescription = (const AGOSGameDescription *)(encapsulatedDesc.realDesc); + return (_gameDescription != 0); } -- cgit v1.2.3