Skip to content

Commit 52c1621

Browse files
committed
Merge branch 'vnext'
2 parents d7f366b + bdb00cc commit 52c1621

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

CompatBot/Utils/ResultFormatters/LogParserResultFormatter.CurrentSettingsSections.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,18 @@ private static void BuildInfoSection(DiscordEmbedBuilder builder, NameValueColle
2222
if (idxEnd > 0)
2323
systemInfo = systemInfo[..idxStart] + systemInfo[idxEnd..];
2424
}
25-
var sysInfoParts = systemInfo.Split(NewLineChars, StringSplitOptions.RemoveEmptyEntries);
25+
var sysInfoParts = systemInfo.Split(NewLineChars, StringSplitOptions.RemoveEmptyEntries).AsSpan();
2626
var buildInfo = BuildInfoInLog().Match(sysInfoParts.Length > 0 ? sysInfoParts[0] : systemInfo);
27-
var cpuInfo = CpuInfoInLog().Match(sysInfoParts.Length > 1 ? sysInfoParts[1] : systemInfo);
28-
var osInfo = LogParser.OsInfo().Match(sysInfoParts.Length > 2 ? sysInfoParts[2] : systemInfo);
27+
var hasCpuInfo = false;
28+
if (sysInfoParts.Length > 1)
29+
{
30+
sysInfoParts = sysInfoParts[1].StartsWith("Architecture:")
31+
? sysInfoParts[2..]
32+
: sysInfoParts[1..];
33+
hasCpuInfo = true;
34+
}
35+
var cpuInfo = CpuInfoInLog().Match(hasCpuInfo ? sysInfoParts[0] : systemInfo);
36+
var osInfo = LogParser.OsInfo().Match(hasCpuInfo && sysInfoParts.Length > 1 ? sysInfoParts[1] : systemInfo);
2937
if (buildInfo.Success)
3038
{
3139
items["build_version"] = buildInfo.Groups["version"].Value.Trim();

CompatBot/Utils/ResultFormatters/LogParserResultFormatter.GeneralNotesSection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private static async ValueTask BuildNotesSectionAsync(DiscordEmbedBuilder builde
279279
&& ramSize < 6)
280280
notes.Add("⚠️ 8 GiB RAM or more is recommended for PS3 emulation");
281281

282-
if (GetCpuUsageStats(multiItems["total_cpu"]) is {avg: >50, max: >95 } cpuUsageStats)
282+
if (GetCpuUsageStats(multiItems["total_cpu"]) is {avg: >50, max: >95} cpuUsageStats)
283283
notes.Add($"⚠️ CPU usage: {cpuUsageStats.avg:0.##}% (min: {cpuUsageStats.min:0.##}% / max: {cpuUsageStats.max:0.##}%)");
284284
if (GetMemUsageStats(multiItems["current_ram"]) is { avg: >0 } memUsageStats
285285
&& ramSize > 0

0 commit comments

Comments
 (0)