From 133a970b21548cf5bdb1f9f2a516a6bc4ae87599 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Fri, 17 May 2019 17:15:37 +0500 Subject: [PATCH] check for the new spurs thread count setting --- .../LogParsing/LogParser.LogSections.cs | 37 ++++++++++--------- ...serResultFormatter.WeirdSettingsSection.cs | 10 +++++ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs index 0095fea9..26c31610 100644 --- a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs +++ b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs @@ -47,7 +47,7 @@ namespace CompatBot.EventHandlers.LogParsing ["Title:"] = new Regex(@"Title: (?.*)?\r?$", DefaultOptions), ["Category:"] = new Regex(@"Category: (?.*)?\r?$", DefaultOptions), ["LDR:"] = new Regex(@"(Path|Cache): ((?\w:/)|(?/[^/])).*?\r?$", DefaultOptions), - ["custom config:"] = new Regex("custom config: (?.*?)\r?$", DefaultOptions), + ["custom config:"] = new Regex(@"custom config: (?.*?)\r?$", DefaultOptions), }, OnNewLineAsync = PiracyCheckAsync, EndTrigger = "Core:", @@ -56,23 +56,24 @@ namespace CompatBot.EventHandlers.LogParsing { Extractors = new Dictionary { - ["PPU Decoder:"] = new Regex("PPU Decoder: (?.*?)\r?$", DefaultOptions), - ["PPU Threads:"] = new Regex("Threads: (?.*?)\r?$", DefaultOptions), + ["PPU Decoder:"] = new Regex(@"PPU Decoder: (?.*?)\r?$", DefaultOptions), + ["PPU Threads:"] = new Regex(@"Threads: (?.*?)\r?$", DefaultOptions), ["Use LLVM CPU:"] = new Regex("Use LLVM CPU: \\\"?(?.*?)\\\"?\r?$", DefaultOptions), - ["thread scheduler:"] = new Regex("scheduler: (?.*?)\r?$", DefaultOptions), - ["SPU Decoder:"] = new Regex("SPU Decoder: (?.*?)\r?$", DefaultOptions), - ["secondary cores:"] = new Regex("secondary cores: (?.*?)\r?$", DefaultOptions), - ["priority:"] = new Regex("priority: (?.*?)\r?$", DefaultOptions), - ["SPU Threads:"] = new Regex("SPU Threads: (?.*?)\r?$", DefaultOptions), - ["SPU delay penalty:"] = new Regex("SPU delay penalty: (?.*?)\r?$", DefaultOptions), - ["SPU loop detection:"] = new Regex("SPU loop detection: (?.*?)\r?$", DefaultOptions), - ["SPU Block Size:"] = new Regex("SPU Block Size: (?.*?)\r?$", DefaultOptions), - ["Enable TSX:"] = new Regex("Enable TSX: (?.*?)\r?$", DefaultOptions), - ["Accurate xfloat:"] = new Regex("Accurate xfloat: (?.*?)\r?$", DefaultOptions), - ["Approximate xfloat:"] = new Regex("Approximate xfloat: (?.*?)\r?$", DefaultOptions), - ["Debug Console Mode:"] = new Regex("Debug Console Mode: (?.*?)\r?$", DefaultOptions), - ["Lib Loader:"] = new Regex("[Ll]oader: (?.*?)\r?$", DefaultOptions), - ["Hook static functions:"] = new Regex("Hook static functions: (?.*?)\r?$", DefaultOptions), + ["thread scheduler:"] = new Regex(@"scheduler: (?.*?)\r?$", DefaultOptions), + ["SPU Decoder:"] = new Regex(@"SPU Decoder: (?.*?)\r?$", DefaultOptions), + ["secondary cores:"] = new Regex(@"secondary cores: (?.*?)\r?$", DefaultOptions), + ["priority:"] = new Regex(@"priority: (?.*?)\r?$", DefaultOptions), + ["SPU Threads:"] = new Regex(@"SPU Threads: (?.*?)\r?$", DefaultOptions), + ["SPU delay penalty:"] = new Regex(@"SPU delay penalty: (?.*?)\r?$", DefaultOptions), + ["SPU loop detection:"] = new Regex(@"SPU loop detection: (?.*?)\r?$", DefaultOptions), + ["Max SPURS Threads:"] = new Regex(@"Max SPURS Threads: (?\d*?)\r?$", DefaultOptions), + ["SPU Block Size:"] = new Regex(@"SPU Block Size: (?.*?)\r?$", DefaultOptions), + ["Enable TSX:"] = new Regex(@"Enable TSX: (?.*?)\r?$", DefaultOptions), + ["Accurate xfloat:"] = new Regex(@"Accurate xfloat: (?.*?)\r?$", DefaultOptions), + ["Approximate xfloat:"] = new Regex(@"Approximate xfloat: (?.*?)\r?$", DefaultOptions), + ["Debug Console Mode:"] = new Regex(@"Debug Console Mode: (?.*?)\r?$", DefaultOptions), + ["Lib Loader:"] = new Regex(@"[Ll]oader: (?.*?)\r?$", DefaultOptions), + ["Hook static functions:"] = new Regex(@"Hook static functions: (?.*?)\r?$", DefaultOptions), ["Load libraries:"] = new Regex(@"libraries:\r?\n(?(.*?(- .*?|\[\])\r?\n)+)", DefaultOptions), ["HLE lwmutex:"] = new Regex(@"HLE lwmutex: (?.*?)\r?$", DefaultOptions), }, @@ -82,7 +83,7 @@ namespace CompatBot.EventHandlers.LogParsing { Extractors = new Dictionary { - ["Enable /host_root/:"] = new Regex("Enable /host_root/: (?.*?)\r?$", DefaultOptions), + ["Enable /host_root/:"] = new Regex(@"Enable /host_root/: (?.*?)\r?$", DefaultOptions), }, EndTrigger = "Video:", }, diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs index 5c53ba88..fa5c31fd 100644 --- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs +++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs @@ -71,6 +71,16 @@ namespace CompatBot.Utils.ResultFormatters notes.Add("⚠ `Hook Static Functions` is enabled, please disable"); if (items["host_root"] is string hostRoot && hostRoot == EnabledMark) notes.Add("❔ `/host_root/` is enabled"); + if (items["spurs_threads"] is string spursSetting + && int.TryParse(spursSetting, out var spursThreads) + && spursThreads != 6) + { + if (spursThreads > 6 || spursThreads < 1) + notes.Add($"⚠ `Max SPURS Threads` is set to `{spursThreads}`; please change it back to `6`"); + else + notes.Add($"ℹ `Max SPURS Threads` is set to `{spursThreads}`; may result in game crash"); + } + if (items["gpu_texture_scaling"] is string gpuTextureScaling && gpuTextureScaling == EnabledMark) notes.Add("⚠ `GPU Texture Scaling` is enabled, please disable"); if (items["af_override"] is string af)