check for the new spurs thread count setting

This commit is contained in:
13xforever 2019-05-17 17:15:37 +05:00
parent 5235ca5cef
commit 133a970b21
2 changed files with 29 additions and 18 deletions

View File

@ -47,7 +47,7 @@ namespace CompatBot.EventHandlers.LogParsing
["Title:"] = new Regex(@"Title: (?<game_title>.*)?\r?$", DefaultOptions),
["Category:"] = new Regex(@"Category: (?<game_category>.*)?\r?$", DefaultOptions),
["LDR:"] = new Regex(@"(Path|Cache): ((?<win_path>\w:/)|(?<lin_path>/[^/])).*?\r?$", DefaultOptions),
["custom config:"] = new Regex("custom config: (?<custom_config>.*?)\r?$", DefaultOptions),
["custom config:"] = new Regex(@"custom config: (?<custom_config>.*?)\r?$", DefaultOptions),
},
OnNewLineAsync = PiracyCheckAsync,
EndTrigger = "Core:",
@ -56,23 +56,24 @@ namespace CompatBot.EventHandlers.LogParsing
{
Extractors = new Dictionary<string, Regex>
{
["PPU Decoder:"] = new Regex("PPU Decoder: (?<ppu_decoder>.*?)\r?$", DefaultOptions),
["PPU Threads:"] = new Regex("Threads: (?<ppu_threads>.*?)\r?$", DefaultOptions),
["PPU Decoder:"] = new Regex(@"PPU Decoder: (?<ppu_decoder>.*?)\r?$", DefaultOptions),
["PPU Threads:"] = new Regex(@"Threads: (?<ppu_threads>.*?)\r?$", DefaultOptions),
["Use LLVM CPU:"] = new Regex("Use LLVM CPU: \\\"?(?<llvm_arch>.*?)\\\"?\r?$", DefaultOptions),
["thread scheduler:"] = new Regex("scheduler: (?<thread_scheduler>.*?)\r?$", DefaultOptions),
["SPU Decoder:"] = new Regex("SPU Decoder: (?<spu_decoder>.*?)\r?$", DefaultOptions),
["secondary cores:"] = new Regex("secondary cores: (?<spu_secondary_cores>.*?)\r?$", DefaultOptions),
["priority:"] = new Regex("priority: (?<spu_lower_thread_priority>.*?)\r?$", DefaultOptions),
["SPU Threads:"] = new Regex("SPU Threads: (?<spu_threads>.*?)\r?$", DefaultOptions),
["SPU delay penalty:"] = new Regex("SPU delay penalty: (?<spu_delay_penalty>.*?)\r?$", DefaultOptions),
["SPU loop detection:"] = new Regex("SPU loop detection: (?<spu_loop_detection>.*?)\r?$", DefaultOptions),
["SPU Block Size:"] = new Regex("SPU Block Size: (?<spu_block_size>.*?)\r?$", DefaultOptions),
["Enable TSX:"] = new Regex("Enable TSX: (?<enable_tsx>.*?)\r?$", DefaultOptions),
["Accurate xfloat:"] = new Regex("Accurate xfloat: (?<accurate_xfloat>.*?)\r?$", DefaultOptions),
["Approximate xfloat:"] = new Regex("Approximate xfloat: (?<approximate_xfloat>.*?)\r?$", DefaultOptions),
["Debug Console Mode:"] = new Regex("Debug Console Mode: (?<debug_console_mode>.*?)\r?$", DefaultOptions),
["Lib Loader:"] = new Regex("[Ll]oader: (?<lib_loader>.*?)\r?$", DefaultOptions),
["Hook static functions:"] = new Regex("Hook static functions: (?<hook_static_functions>.*?)\r?$", DefaultOptions),
["thread scheduler:"] = new Regex(@"scheduler: (?<thread_scheduler>.*?)\r?$", DefaultOptions),
["SPU Decoder:"] = new Regex(@"SPU Decoder: (?<spu_decoder>.*?)\r?$", DefaultOptions),
["secondary cores:"] = new Regex(@"secondary cores: (?<spu_secondary_cores>.*?)\r?$", DefaultOptions),
["priority:"] = new Regex(@"priority: (?<spu_lower_thread_priority>.*?)\r?$", DefaultOptions),
["SPU Threads:"] = new Regex(@"SPU Threads: (?<spu_threads>.*?)\r?$", DefaultOptions),
["SPU delay penalty:"] = new Regex(@"SPU delay penalty: (?<spu_delay_penalty>.*?)\r?$", DefaultOptions),
["SPU loop detection:"] = new Regex(@"SPU loop detection: (?<spu_loop_detection>.*?)\r?$", DefaultOptions),
["Max SPURS Threads:"] = new Regex(@"Max SPURS Threads: (?<spurs_threads>\d*?)\r?$", DefaultOptions),
["SPU Block Size:"] = new Regex(@"SPU Block Size: (?<spu_block_size>.*?)\r?$", DefaultOptions),
["Enable TSX:"] = new Regex(@"Enable TSX: (?<enable_tsx>.*?)\r?$", DefaultOptions),
["Accurate xfloat:"] = new Regex(@"Accurate xfloat: (?<accurate_xfloat>.*?)\r?$", DefaultOptions),
["Approximate xfloat:"] = new Regex(@"Approximate xfloat: (?<approximate_xfloat>.*?)\r?$", DefaultOptions),
["Debug Console Mode:"] = new Regex(@"Debug Console Mode: (?<debug_console_mode>.*?)\r?$", DefaultOptions),
["Lib Loader:"] = new Regex(@"[Ll]oader: (?<lib_loader>.*?)\r?$", DefaultOptions),
["Hook static functions:"] = new Regex(@"Hook static functions: (?<hook_static_functions>.*?)\r?$", DefaultOptions),
["Load libraries:"] = new Regex(@"libraries:\r?\n(?<library_list>(.*?(- .*?|\[\])\r?\n)+)", DefaultOptions),
["HLE lwmutex:"] = new Regex(@"HLE lwmutex: (?<hle_lwmutex>.*?)\r?$", DefaultOptions),
},
@ -82,7 +83,7 @@ namespace CompatBot.EventHandlers.LogParsing
{
Extractors = new Dictionary<string, Regex>
{
["Enable /host_root/:"] = new Regex("Enable /host_root/: (?<host_root>.*?)\r?$", DefaultOptions),
["Enable /host_root/:"] = new Regex(@"Enable /host_root/: (?<host_root>.*?)\r?$", DefaultOptions),
},
EndTrigger = "Video:",
},

View File

@ -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)