From 35967067557c50fb389e2af22d7e2d80f8234249 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Tue, 27 Aug 2019 17:34:41 +0500 Subject: [PATCH] add tlou settings check --- .../LogParsing/LogParser.LogSections.cs | 3 ++ ...serResultFormatter.WeirdSettingsSection.cs | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs index 01278950..912daf5f 100644 --- a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs +++ b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs @@ -102,6 +102,9 @@ namespace CompatBot.EventHandlers.LogParsing ["Frame limit:"] = new Regex("Frame limit: (?.*?)\r?$", DefaultOptions), ["MSAA:"] = new Regex("MSAA: (?.*?)\r?$", DefaultOptions), ["Write Color Buffers:"] = new Regex("Write Color Buffers: (?.*?)\r?$", DefaultOptions), + ["Write Depth Buffer:"] = new Regex("Write Depth Buffer: (?.*?)\r?$", DefaultOptions), + ["Read Color Buffers:"] = new Regex("Read Color Buffers: (?.*?)\r?$", DefaultOptions), + ["Read Depth Buffer:"] = new Regex("Read Depth Buffer: (?.*?)\r?$", DefaultOptions), ["VSync:"] = new Regex("VSync: (?.*?)\r?$", DefaultOptions), ["GPU texture scaling:"] = new Regex("Use GPU texture scaling: (?.*?)\r?$", DefaultOptions), ["Strict Rendering Mode:"] = new Regex("Strict Rendering Mode: (?.*?)\r?$", DefaultOptions), diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs index ecc91848..f053c45d 100644 --- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs +++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs @@ -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 TlouIds = new HashSet + { + "BCAS20270", "BCES01584", "BCES01585", "BCJS37010", "BCUS98174", + "NPEA00435", "NPEA00521", "NPJA00096", "NPJA00129", + "NPUA30134", "NPUA70257", "NPUA80960", "NPUA81175", + "NPHA80206", "NPHA80279", + }; + + private static void CheckTlouSettings(string serial, NameValueCollection items, List 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 notes) { if (items["build_branch"] is string branch