ALL: sync with scummvm
This commit is contained in:
parent
0c962164d4
commit
7329a5d164
126 changed files with 2443 additions and 1679 deletions
|
@ -20,9 +20,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// FIXME: Avoid using printf
|
||||
#define FORBIDDEN_SYMBOL_EXCEPTION_printf
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "common/util.h"
|
||||
#include "common/hash-str.h"
|
||||
|
@ -30,7 +27,9 @@
|
|||
#include "common/macresman.h"
|
||||
#include "common/md5.h"
|
||||
#include "common/config-manager.h"
|
||||
#include "common/system.h"
|
||||
#include "common/textconsole.h"
|
||||
#include "common/translation.h"
|
||||
|
||||
#include "engines/advancedDetector.h"
|
||||
|
||||
|
@ -196,12 +195,10 @@ static void updateGameDescriptor(GameDescriptor &desc, const ADGameDescription *
|
|||
desc["gameid"] = params.singleid;
|
||||
}
|
||||
|
||||
if (!(params.flags & kADFlagDontAugmentPreferredTarget)) {
|
||||
if (!desc.contains("preferredtarget"))
|
||||
desc["preferredtarget"] = desc["gameid"];
|
||||
if (!desc.contains("preferredtarget"))
|
||||
desc["preferredtarget"] = desc["gameid"];
|
||||
|
||||
desc["preferredtarget"] = generatePreferredTarget(desc["preferredtarget"], realDesc);
|
||||
}
|
||||
desc["preferredtarget"] = generatePreferredTarget(desc["preferredtarget"], realDesc);
|
||||
|
||||
if (params.flags & kADFlagUseExtraAsHint)
|
||||
desc["extra"] = realDesc->extra;
|
||||
|
@ -226,7 +223,7 @@ bool cleanupPirated(ADGameDescList &matched) {
|
|||
// We ruled out all variants and now have nothing
|
||||
if (matched.empty()) {
|
||||
|
||||
warning("Illegitimate copy of the game detected. We give no support in such cases %d", matched.size());
|
||||
warning("Illegitimate game copy detected. We give no support in such cases %d", matched.size());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -368,14 +365,18 @@ static void reportUnknown(const Common::FSNode &path, const SizeMD5Map &filesSiz
|
|||
//
|
||||
// Might also be helpful to display the full path (for when this is used
|
||||
// from the mass detector).
|
||||
printf("The game in '%s' seems to be unknown.\n", path.getPath().c_str());
|
||||
printf("Please, report the following data to the Residual team along with name\n");
|
||||
printf("of the game you tried to add and its version/language/etc.:\n");
|
||||
Common::String report = Common::String::format(_("The game in '%s' seems to be unknown."), path.getPath().c_str()) + "\n";
|
||||
report += _("Please, report the following data to the Residual team along with name");
|
||||
report += "\n";
|
||||
report += _("of the game you tried to add and its version/language/etc.:");
|
||||
report += "\n";
|
||||
|
||||
for (SizeMD5Map::const_iterator file = filesSizeMD5.begin(); file != filesSizeMD5.end(); ++file)
|
||||
printf(" {\"%s\", 0, \"%s\", %d},\n", file->_key.c_str(), file->_value.md5.c_str(), file->_value.size);
|
||||
report += Common::String::format(" {\"%s\", 0, \"%s\", %d},\n", file->_key.c_str(), file->_value.md5.c_str(), file->_value.size);
|
||||
|
||||
printf("\n");
|
||||
report += "\n";
|
||||
|
||||
g_system->logMessage(LogMessageType::kInfo, report.c_str());
|
||||
}
|
||||
|
||||
static ADGameDescList detectGameFilebased(const FileMap &allFiles, const ADParams ¶ms);
|
||||
|
@ -628,10 +629,14 @@ static ADGameDescList detectGameFilebased(const FileMap &allFiles, const ADParam
|
|||
if (matchedDesc) { // We got a match
|
||||
matched.push_back(matchedDesc);
|
||||
if (params.flags & kADFlagPrintWarningOnFileBasedFallback) {
|
||||
printf("Your game version has been detected using filename matching as a\n");
|
||||
printf("variant of %s.\n", matchedDesc->gameid);
|
||||
printf("If this is an original and unmodified version, please report any\n");
|
||||
printf("information previously printed by Residual to the team.\n");
|
||||
Common::String report = Common::String::format(_("Your game version has been detected using "
|
||||
"filename matching as a variant of %s."), matchedDesc->gameid);
|
||||
report += "\n";
|
||||
report += _("If this is an original and unmodified version, please report any");
|
||||
report += "\n";
|
||||
report += _("information previously printed by Residual to the team.");
|
||||
report += "\n";
|
||||
g_system->logMessage(LogMessageType::kInfo, report.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue