示例#1
0
        private void RebuildGame(GameFile game, FileEntry fileEntry = null, TitleEntry titleEntry = null)
        {
            Debug.WriteLine("{0} {1}", game.TitleId, game.Title);
            var name = game.TitleId + ".gpd";

            fileEntry  = fileEntry ?? GetFileEntry(name, true);
            titleEntry = titleEntry ?? ProfileInfo.TitlesPlayed.FirstOrDefault(t => t.TitleCode == game.TitleId);
            if (titleEntry == null)
            {
                throw new ArgumentException("Invalid title: " + game.TitleId);
            }
            game.Rebuild();

            ////HACK: Horizon emu
            //RemoveFile(fileEntry);

            ReplaceFile(fileEntry, game);
            titleEntry.AchievementsUnlocked = game.UnlockedAchievementCount;
            titleEntry.GamerscoreUnlocked   = game.Gamerscore;
        }