add tlou settings check

This commit is contained in:
13xforever 2019-08-27 17:34:41 +05:00
parent c1ae272064
commit 3596706755
2 changed files with 37 additions and 0 deletions

View File

@ -102,6 +102,9 @@ namespace CompatBot.EventHandlers.LogParsing
["Frame limit:"] = new Regex("Frame limit: (?<frame_limit>.*?)\r?$", DefaultOptions),
["MSAA:"] = new Regex("MSAA: (?<msaa>.*?)\r?$", DefaultOptions),
["Write Color Buffers:"] = new Regex("Write Color Buffers: (?<write_color_buffers>.*?)\r?$", DefaultOptions),
["Write Depth Buffer:"] = new Regex("Write Depth Buffer: (?<write_depth_buffer>.*?)\r?$", DefaultOptions),
["Read Color Buffers:"] = new Regex("Read Color Buffers: (?<read_color_buffers>.*?)\r?$", DefaultOptions),
["Read Depth Buffer:"] = new Regex("Read Depth Buffer: (?<read_depth_buffer>.*?)\r?$", DefaultOptions),
["VSync:"] = new Regex("VSync: (?<vsync>.*?)\r?$", DefaultOptions),
["GPU texture scaling:"] = new Regex("Use GPU texture scaling: (?<gpu_texture_scaling>.*?)\r?$", DefaultOptions),
["Strict Rendering Mode:"] = new Regex("Strict Rendering Mode: (?<strict_rendering_mode>.*?)\r?$", DefaultOptions),

View File

@ -77,6 +77,7 @@ namespace CompatBot.Utils.ResultFormatters
CheckScottPilgrimSettings(serial, items, notes);
CheckGoWSettings(serial, items, notes);
CheckDesSettings(serial, items, notes, ppuPatches);
CheckTlouSettings(serial, items, notes);
}
else if (items["game_title"] == "vsh.self")
CheckVshSettings(items, notes);
@ -454,6 +455,39 @@ namespace CompatBot.Utils.ResultFormatters
}
}
private static readonly HashSet<string> TlouIds = new HashSet<string>
{
"BCAS20270", "BCES01584", "BCES01585", "BCJS37010", "BCUS98174",
"NPEA00435", "NPEA00521", "NPJA00096", "NPJA00129",
"NPUA30134", "NPUA70257", "NPUA80960", "NPUA81175",
"NPHA80206", "NPHA80279",
};
private static void CheckTlouSettings(string serial, NameValueCollection items, List<string> notes)
{
if (!TlouIds.Contains(serial))
return;
if (items["write_color_buffers"] == DisabledMark)
notes.Add("⚠ Please enable `Write Color Buffers`");
if (items["read_color_buffers"] == DisabledMark)
notes.Add("⚠ Please enable `Read Color Buffers`");
if (items["read_depth_buffer"] == DisabledMark)
notes.Add("⚠ Please enable `Read Depth Buffer`");
if (items["cpu_blit"] == DisabledMark)
notes.Add("⚠ Please enable `Force CPU Blit`");
if (items["resolution_scale"] is string resFactor
&& int.TryParse(resFactor, out var resolutionScale)
&& resolutionScale > 100
&& items["strict_rendering_mode"] != EnabledMark)
notes.Add("⚠ Please set `Resolution Scale` to 100%");
}
private static void CheckVshSettings(NameValueCollection items, List<string> notes)
{
if (items["build_branch"] is string branch