Skip to content

Commit

Permalink
Merge pull request #943 from 13xforever/vnext
Browse files Browse the repository at this point in the history
Maintenance
  • Loading branch information
clienthax authored Sep 26, 2023
2 parents e78cea8 + 8a05761 commit 07c654c
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 91 deletions.
6 changes: 0 additions & 6 deletions .cirrus.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Clients/CirrusCiClient/CirrusCiClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="StrawberryShake.Server" Version="13.4.0" />
<PackageReference Include="StrawberryShake.Server" Version="13.5.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Clients/CompatApiClient/CompatApiClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="NLog" Version="5.2.4" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Clients/IrdLibraryClient/IrdLibraryClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="Crc32.NET" Version="1.2.0" />
<PackageReference Include="DiscUtils.OpticalDisk" Version="0.16.13" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.51" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.53" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
</ItemGroup>
<ItemGroup>
Expand Down
10 changes: 4 additions & 6 deletions CompatBot/Commands/Vision.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ public async Task Tag(CommandContext ctx, string? imageUrl = null)
await using (var stream = await httpClient.GetStreamAsync(imageUrl).ConfigureAwait(false))
await stream.CopyToAsync(imageStream).ConfigureAwait(false);
imageStream.Seek(0, SeekOrigin.Begin);
#pragma warning disable VSTHRD103
using var img = Image.Load(imageStream, out var imgFormat);
#pragma warning restore VSTHRD103
using var img = await Image.LoadAsync(imageStream).ConfigureAwait(false);
imageStream.Seek(0, SeekOrigin.Begin);

//resize and shrink file size to get under azure limits
Expand All @@ -123,7 +121,7 @@ public async Task Tag(CommandContext ctx, string? imageUrl = null)
resized = true;
}
img.Mutate(i => i.AutoOrient());
if (resized || imgFormat.Name != JpegFormat.Instance.Name)
if (resized || img.Metadata.DecodedImageFormat?.Name != JpegFormat.Instance.Name)
{
imageStream.SetLength(0);
await img.SaveAsync(imageStream, new JpegEncoder {Quality = 90}).ConfigureAwait(false);
Expand Down Expand Up @@ -236,15 +234,15 @@ public async Task Tag(CommandContext ctx, string? imageUrl = null)
var complementaryColor = complementaryPalette[i % complementaryPalette.Count];
var textOptions = new TextOptions(font)
{
KerningMode = KerningMode.Normal,
KerningMode = KerningMode.Standard,
#if LABELS_INSIDE
WrapTextWidth = r.W - 10,
#endif
};
var textDrawingOptions = new DrawingOptions {GraphicsOptions = fgGop/*, TextOptions = textOptions*/};
//var brush = Brushes.Solid(Color.Black);
//var pen = Pens.Solid(color, 2);
var textBox = TextMeasurer.Measure(label, textOptions);
var textBox = TextMeasurer.MeasureBounds(label, textOptions);
#if LABELS_INSIDE
var textHeightScale = (int)Math.Ceiling(textBox.Width / Math.Min(img.Width - r.X - 10 - 4 * scale, r.W - 4 * scale));
#endif
Expand Down
18 changes: 9 additions & 9 deletions CompatBot/CompatBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@
<PackageReference Include="DSharpPlus.CommandsNext" Version="4.4.2" />
<PackageReference Include="DSharpPlus.Interactivity" Version="4.4.2" />
<PackageReference Include="DSharpPlus.SlashCommands" Version="4.4.2" />
<PackageReference Include="Google.Apis.Drive.v3" Version="1.61.0.3120" />
<PackageReference Include="Google.Apis.Drive.v3" Version="1.62.0.3155" />
<PackageReference Include="ksemenenko.ColorThief" Version="1.1.1.4" />
<PackageReference Include="MathParser.org-mXparser" Version="5.2.1" />
<PackageReference Include="MegaApiClient" Version="1.10.3" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.21.0" />
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.21.0" />
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.ComputerVision" Version="7.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.9">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.11">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.11" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.3.2" />
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.205.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageReference Include="Nerdbank.Streams" Version="2.10.69" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.2" />
<PackageReference Include="NLog" Version="5.2.4" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.4" />
<PackageReference Include="NReco.Text.AhoCorasickDoubleArrayTrie" Version="1.1.1" />
<PackageReference Include="SharpCompress" Version="0.33.0" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta15" />
<PackageReference Include="SharpCompress" Version="0.34.0" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.0.0" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ internal partial class LogParser
["Accurate xfloat:"] = new(@"Accurate xfloat: (?<accurate_xfloat>.*?)\r?$", DefaultOptions),
["Approximate xfloat:"] = new(@"Approximate xfloat: (?<approximate_xfloat>.*?)\r?$", DefaultOptions),
["Relaxed xfloat:"] = new(@"Relaxed xfloat: (?<relaxed_xfloat>.*?)\r?$", DefaultOptions),
["XFloat Accuracy:"] = new(@"XFloat Accuracy: (?<xfloat_mode>.*?)\r?$", DefaultOptions),
["Accurate GETLLAR:"] = new(@"Accurate GETLLAR: (?<accurate_getllar>.*?)\r?$", DefaultOptions),
["Accurate PUTLLUC:"] = new(@"Accurate PUTLLUC: (?<accurate_putlluc>.*?)\r?$", DefaultOptions),
["Accurate RSX reservation access:"] = new(@"Accurate RSX reservation access: (?<accurate_rsx_reservation>.*?)\r?$", DefaultOptions),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ private static async Task BuildNotesSectionAsync(DiscordEmbedBuilder builder, Lo
var serial = items["serial"] ?? "";
BuildFatalErrorSection(builder, items, multiItems, notes);

Version? buildVersion = null;
if (items["build_branch"] is "HEAD" or "master")
Version.TryParse(items["build_full_version"], out buildVersion);
TryGetRpcs3Version(items, out var buildVersion);
var supportedGpu = string.IsNullOrEmpty(items["rsx_unsupported_gpu"]) && items["supported_gpu"] != DisabledMark;
var unsupportedGpuDriver = false;
if (Config.Colors.CompatStatusNothing.Equals(builder.Color.Value) || Config.Colors.CompatStatusLoadable.Equals(builder.Color.Value))
Expand Down Expand Up @@ -313,7 +311,7 @@ private static async Task BuildNotesSectionAsync(DiscordEmbedBuilder builder, Lo
else if (driverVersionString.Contains("older than", StringComparison.InvariantCultureIgnoreCase))
{
if (IsAmd(gpuInfo))
notes.Add($"❗ Please update your AMD GPU driver to version {AmdLastGoodOpenGLWindowsVersion} or newer");
notes.Add($"❗ Please update your AMD GPU driver to version {AmdRecommendedOldWindowsVersion} or newer");
}
}
}
Expand Down Expand Up @@ -541,8 +539,7 @@ private static void BuildFatalErrorSection(DiscordEmbedBuilder builder, NameValu
}
else if (fatalError.Contains("RSX Decompiler Thread"))
{
if (items["build_branch"] is "HEAD" or "master"
&& Version.TryParse(items["build_full_version"], out var v)
if (TryGetRpcs3Version(items, out var v)
&& v >= DecompilerIssueStartVersion
&& v < DecompilerIssueEndVersion)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ private static void BuildWeirdSettingsSection(DiscordEmbedBuilder builder, LogPa
var hasTsxFa = items["cpu_extensions"]?.Contains("TSX-FA") ?? false;
items["has_tsx"] = hasTsx ? EnabledMark : DisabledMark;
items["has_tsx_fa"] = hasTsxFa ? EnabledMark : DisabledMark;
Version? buildVersion = null;
if (items["build_branch"] is "HEAD" or "master"
&& Version.TryParse(items["build_full_version"], out buildVersion)
if (TryGetRpcs3Version(items, out var buildVersion)
&& buildVersion < TsxFaFixedVersion)
{
if (items["enable_tsx"] == "Disabled" && hasTsx && !hasTsxFa)
Expand Down Expand Up @@ -271,33 +269,14 @@ private static void BuildWeirdSettingsSection(DiscordEmbedBuilder builder, LogPa
if (items["accurate_rsx_reservation"] == EnabledMark)
notes.Add("ℹ️ `Accurate RSX Reservation Access` is enabled");

if (items["accurate_xfloat"] is string accurateXfloat)
{
if (accurateXfloat == EnabledMark)
{
if (!KnownGamesThatRequireAccurateXfloat.Contains(serial))
notes.Add("⚠️ `Accurate xfloat` is not required, and significantly impacts performance");
}
else
{
if (KnownGamesThatRequireAccurateXfloat.Contains(serial))
notes.Add("⚠️ `Accurate xfloat` is required for this game, but it will significantly impact performance");
}
}
if (items["relaxed_xfloat"] is DisabledMark)
{
if (KnownNoRelaxedXFloatIds.Contains(serial))
notes.Add("ℹ️ `Relaxed xfloat` is disabled");
else
notes.Add("⚠️ `Relaxed xfloat` is disabled, please enable");
}
if (items["approximate_xfloat"] is DisabledMark)
{
if (KnownNoApproximateXFloatIds.Contains(serial))
notes.Add("ℹ️ `Approximate xfloat` is disabled");
else
notes.Add("⚠️ `Approximate xfloat` is disabled, please enable");
}
if (KnownGamesThatRequireAccurateXfloat.Contains(serial) && items["xfloat_mode"] is not "Accurate")
notes.Add("⚠️ `Accurate xfloat` is required for this game");
else if (items["xfloat_mode"] is "Accurate" && !KnownGamesThatRequireAccurateXfloat.Contains(serial))
notes.Add("⚠️ `Accurate xfloat` is not required, and significantly impacts performance");
else if (items["xfloat_mode"] is "Relaxed" or "Inaccurate" && !KnownNoApproximateXFloatIds.Contains(serial))
notes.Add("⚠️ `Approximate xfloat` is disabled, please enable");
else if (items["xfloat_mode"] is "Inaccurate" && !KnownNoRelaxedXFloatIds.Contains(serial))
notes.Add("⚠️ `Relaxed xfloat` is disabled, please enable");
if (items["resolution_scale"] is string resScale
&& int.TryParse(resScale, out var resScaleFactor))
{
Expand Down Expand Up @@ -403,7 +382,7 @@ private static void BuildWeirdSettingsSection(DiscordEmbedBuilder builder, LogPa
CheckP5Settings(serial, items, notes, generalNotes, ppuHashes, ppuPatches, patchNames);
CheckAsurasWrathSettings(serial, items, notes);
CheckJojoSettings(serial, state, notes, ppuPatches, ppuHashes, generalNotes);
CheckSimpsonsSettings(serial, generalNotes);
CheckSimpsonsSettings(serial, items, generalNotes, ppuPatches, patchNames);
CheckNierSettings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckDod3Settings(serial, items, notes, ppuPatches, ppuHashes, generalNotes);
CheckScottPilgrimSettings(serial, items, notes, generalNotes);
Expand Down Expand Up @@ -700,9 +679,14 @@ private static void CheckJojoSettings(string serial, LogParseState state, List<s
}
}

private static void CheckSimpsonsSettings(string serial, List<string> generalNotes)
private static void CheckSimpsonsSettings(string serial, NameValueCollection items, List<string> generalNotes, Dictionary<string, int> ppuPatches, UniqueList<string> patchNames)
{
if (serial is "BLES00142" or "BLUS30065")
if (serial is not ("BLES00142" or "BLUS30065"))
return;

var hasPatch = ppuPatches.Any() && patchNames.Any(n => n.Contains("Fix pad initialization", StringComparison.OrdinalIgnoreCase));
if ((!TryGetRpcs3Version(items, out var v) || v < FixedSimpsonsBuild)
&& !hasPatch)
generalNotes.Add("ℹ️ This game has a controller initialization bug. Please use [the patch](https://wiki.rpcs3.net/index.php?title=The_Simpsons_Game#Patches).");
}

Expand Down Expand Up @@ -944,8 +928,7 @@ private static void CheckTlouSettings(string serial, NameValueCollection items,
notes.Add("⚠️ Please enable `Read Color Buffers`");
var depthBufferPatchesAreApplied = ppuPatches.Any() && patchNames.Count(n => n.Contains("depth buffer", StringComparison.OrdinalIgnoreCase)) > 1;

if (items["build_branch"] is "HEAD" or "master"
&& Version.TryParse(items["build_full_version"], out var buildVersion)
if (TryGetRpcs3Version(items, out var buildVersion)
&& buildVersion < FixedTlouRcbBuild)
{
if (items["read_depth_buffer"] == EnabledMark)
Expand Down
Loading

0 comments on commit 07c654c

Please sign in to comment.