show main ppu hash

This commit is contained in:
13xforever 2019-09-17 19:18:14 +05:00
parent 029c294338
commit 18b4598c54
3 changed files with 14 additions and 2 deletions

View File

@ -181,7 +181,7 @@ namespace CompatBot.EventHandlers.LogParsing
["Pad handler expected but none initialized"] = new Regex(@"(?<native_ui_input>Pad handler expected but none initialized).*?\r?$", DefaultOptions),
["XAudio2Thread"] = new Regex(@"XAudio2Thread\s*: (?<xaudio_init_error>.+failed\s*\((?<xaudio_error_code>0x.+)\).*)\r?$", DefaultOptions),
["cellAudio Thread"] = new Regex(@"XAudio2Backend\s*: (?<xaudio_init_error>.+failed\s*\((?<xaudio_error_code>0x.+)\).*)\r?$", DefaultOptions),
["PPU executable hash:"] = new Regex(@"PPU executable hash: PPU-(?<ppu_hash>\w+) \(<-\s*(?<ppu_hash_patch>(?!0)\d+)\).*?\r?$", DefaultOptions),
["PPU executable hash:"] = new Regex(@"PPU executable hash: PPU-(?<ppu_hash>\w+) \(<-\s*(?<ppu_hash_patch>\d+)\).*?\r?$", DefaultOptions),
["OVL executable hash:"] = new Regex(@"OVL executable hash: OVL-(?<ovl_hash>\w+) \(<-\s*(?<ovl_hash_patch>(?!0)\d+)\).*?\r?$", DefaultOptions),
["Loaded SPU image:"] = new Regex(@"Loaded SPU image: SPU-(?<spu_hash>\w+) \(<-\s*(?<spu_hash_patch>(?!0)\d+)\).*?\r?$", DefaultOptions),
["'sys_fs_open' failed"] = new Regex(@"'sys_fs_open' failed .+\xE2\x80\x9C/dev_bdvd/(?<broken_filename>.+)\xE2\x80\x9D.*?\r?$", DefaultOptions),

View File

@ -368,6 +368,17 @@ namespace CompatBot.Utils.ResultFormatters
if (ppuPatches.Values.Any(n => n == 12 || n == 12+27))
notes.Add("⚠ An old version of the 60 fps patch is used");
}
if (items["ppu_hash"] is string ppuHashes
&& ppuHashes.Split(Environment.NewLine, 2, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault() is string firstPpuHash
&& !string.IsNullOrEmpty(firstPpuHash))
{
var exe = Path.GetFileName(items["elf_boot_path"] ?? "");
if (string.IsNullOrEmpty(exe) || exe.Equals("EBOOT.BIN", StringComparison.InvariantCultureIgnoreCase))
exe = "Main";
else
exe = $"`{exe}`";
notes.Add($" {exe} hash: `PPU-{firstPpuHash}`");
}
bool discInsideGame = false;
bool discAsPkg = false;

View File

@ -655,7 +655,8 @@ namespace CompatBot.Utils.ResultFormatters
for (var i = 0; i < hashes.Length; i++)
{
int.TryParse(patches[i], out var pCount);
result[hashes[i]] = pCount;
if (pCount > 0)
result[hashes[i]] = pCount;
}
return result;
}