Ticket #3398: advdetect-traces.diff

File advdetect-traces.diff, 1.3 KB (added by cyxx, 17 years ago)

adds some traces to the advanced detector code

  • common/advancedDetector.cpp

     
    316316        File testFile;
    317317
    318318        String tstr;
    319        
     319
    320320        uint i;
    321321        char md5str[32+1];
    322322
     
    391391
    392392        ADGameDescList matched;
    393393        int maxFilesMatched = 0;
    394 
     394printf("params.descs %p (%d)\n", params.descs, params.descItemSize);
    395395        // MD5 based matching
    396396        for (i = 0, descPtr = params.descs; ((const ADGameDescription *)descPtr)->gameid != 0; descPtr += params.descItemSize, ++i) {
    397397                g = (const ADGameDescription *)descPtr;
    398398                fileMissing = false;
    399 
     399printf("descPtr %p (%d) gameid %s language %d/%d platform %d/%d\n", descPtr, params.descItemSize, g->gameid, language, g->language, platform, g->platform);
    400400                // Do not even bother to look at entries which do not have matching
    401401                // language and platform (if specified).
    402402                if ((language != UNK_LANG && g->language != language) ||
     
    410410                        tstr.toLowercase();
    411411
    412412                        if (!filesMD5.contains(tstr)) {
     413printf("!filesMD5.contains fileDesc %p fileDesc->fileName %s (%s)\n", fileDesc, fileDesc->fileName, tstr.c_str());
    413414                                fileMissing = true;
    414415                                break;
    415416                        }
     
    458459                }
    459460        }
    460461
    461         // We've found a match 
     462        // We've found a match
    462463        if (!matched.empty())
    463464                return matched;
    464465