From 6b7c40985845c538097fad166f24c8ea411af4c3 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Tue, 13 Oct 2020 18:14:05 +0500 Subject: [PATCH] apparently pad configuration logging was broken for a while --- CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs | 4 +++- .../LogParserResultFormatter.GeneralNotesSection.cs | 3 --- .../LogParserResultFormatter.WeirdSettingsSection.cs | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs index 4e1f819c..40789119 100644 --- a/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs +++ b/CompatBot/EventHandlers/LogParsing/LogParser.LogSections.cs @@ -199,6 +199,8 @@ namespace CompatBot.EventHandlers.LogParsing ["Failed to load RAP file:"] = new Regex(@"Failed to load RAP file: (?.*?\.rap).*\r?$", DefaultOptions), ["Rap file not found:"] = new Regex(@"Rap file not found: (\xE2\x80\x9C)?(?.*?)(\xE2\x80\x9D)?\r?$", DefaultOptions), ["Pad handler expected but none initialized"] = new Regex(@"(?Pad handler expected but none initialized).*?\r?$", DefaultOptions), + ["Failed to bind device"] = new Regex(@"Failed to bind device (?.+) to handler (?.+).*\r?$", DefaultOptions), + ["Input:"] = new Regex(@"Input: (?.*?) device .+ connected\r?$", DefaultOptions), ["XAudio2Thread"] = new Regex(@"XAudio2Thread\s*: (?.+failed\s*\((?0x.+)\).*)\r?$", DefaultOptions), ["cellAudio Thread"] = new Regex(@"XAudio2Backend\s*: (?.+failed\s*\((?0x.+)\).*)\r?$", DefaultOptions), ["using a Null renderer instead"] = new Regex(@"Audio renderer (?.+) could not be initialized\r?$", DefaultOptions), @@ -214,7 +216,6 @@ namespace CompatBot.EventHandlers.LogParsing ["do you have the PS3 firmware installed"] = new Regex(@"(?do you have the PS3 firmware installed.*)\r?$", DefaultOptions), ["Unimplemented syscall"] = new Regex(@"U \d+:\d+:\d+\.\d+ ({(?.+?)} )?.*Unimplemented syscall (?.*)\r?$", DefaultOptions), ["Could not enqueue"] = new Regex(@"cellAudio: Could not enqueue buffer onto audio backend(?.).*\r?$", DefaultOptions), - ["Failed to bind device"] = new Regex(@"Failed to bind device (?.+) to handler (?.+).*\r?$", DefaultOptions), ["{PPU["] = new Regex(@"{PPU\[.+\]} (?[^ :]+)( TODO)?: (?!\xE2\x80\x9C)(?[^ :]+?)\(.*\r?$", DefaultOptions), ["⁂"] = new Regex(@"\xE2\x81\x82 (?[^ :\[]+?) .*\r?$", DefaultOptions), ["undub"] = new Regex(@"(\b|_)(?(undub|translation patch))(\b|_)", DefaultOptions | RegexOptions.IgnoreCase), @@ -226,6 +227,7 @@ namespace CompatBot.EventHandlers.LogParsing public static readonly HashSet MultiValueItems = new HashSet { + "pad_handler", "fatal_error_context", "fatal_error", "rap_file", diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs index 692c1f7a..9615c030 100644 --- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs +++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs @@ -503,9 +503,6 @@ namespace CompatBot.Utils.ResultFormatters notes.Add($"😱 `{buildBranch}` build is obsolete, current master build offers at least the same level of performance and includes many additional improvements"); } - if (items["failed_pad"] is string failedPad) - notes.Add($"⚠ Binding `{failedPad.Sanitize(replaceBackTicks: true)}` failed, check if device is connected."); - if (DesIds.Contains(serial)) notes.Add("ℹ If you experience infinite load screen, clear game cache via `File` → `All games` → `Remove Disk Cache`"); diff --git a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs index b4198eec..4e0a2aef 100644 --- a/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs +++ b/CompatBot/Utils/ResultFormatters/LogParserResultFormatter.WeirdSettingsSection.cs @@ -434,10 +434,12 @@ namespace CompatBot.Utils.ResultFormatters notes.Add("ℹ `Multithreaded RSX` is enabled"); } + if (items["failed_pad"] is string failedPad) + notes.Add($"⚠ Binding `{failedPad.Sanitize(replaceBackTicks: true)}` failed, check if device is connected."); + if (!string.IsNullOrEmpty(serial) && KnownMotionControlsIds.Contains(serial) - && items["pad_handler"] is string padHandler - && !padHandler.StartsWith("DualShock")) + && !multiItems["pad_handler"].Any(h => h.StartsWith("DualShock"))) notes.Add("❗ This game requires motion controls, please use native handler for DualShock 3 or DualShock 4 controller"); if (items["audio_backend"] is string audioBackend && !string.IsNullOrEmpty(audioBackend))