mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-10 17:14:25 +00:00
misc: chore: compat database code cleanups
This commit is contained in:
parent
638c616ab7
commit
25cc9b24b4
@ -50,16 +50,6 @@ namespace Ryujinx.Ava.Systems
|
|||||||
|
|
||||||
public static CompatibilityEntry Find(ulong titleId)
|
public static CompatibilityEntry Find(ulong titleId)
|
||||||
=> Find(titleId.ToString("X16"));
|
=> Find(titleId.ToString("X16"));
|
||||||
|
|
||||||
public static LocaleKeys? GetStatus(string titleId)
|
|
||||||
=> Find(titleId)?.Status;
|
|
||||||
|
|
||||||
public static LocaleKeys? GetStatus(ulong titleId) => GetStatus(titleId.ToString("X16"));
|
|
||||||
|
|
||||||
public static string GetLabels(string titleId)
|
|
||||||
=> Find(titleId)?.FormattedIssueLabels;
|
|
||||||
|
|
||||||
public static string GetLabels(ulong titleId) => GetLabels(titleId.ToString("X16"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CompatibilityEntry
|
public class CompatibilityEntry
|
||||||
@ -120,6 +110,7 @@ namespace Ryujinx.Ava.Systems
|
|||||||
|
|
||||||
public string FormattedIssueLabels => Labels
|
public string FormattedIssueLabels => Labels
|
||||||
.Select(FormatLabelName)
|
.Select(FormatLabelName)
|
||||||
|
.Where(x => x != null)
|
||||||
.JoinToString(", ");
|
.JoinToString(", ");
|
||||||
|
|
||||||
public override string ToString() =>
|
public override string ToString() =>
|
||||||
@ -143,7 +134,6 @@ namespace Ryujinx.Ava.Systems
|
|||||||
"gui" => "GUI",
|
"gui" => "GUI",
|
||||||
"help wanted" => "Help Wanted",
|
"help wanted" => "Help Wanted",
|
||||||
"horizon" => "Horizon",
|
"horizon" => "Horizon",
|
||||||
"infra" => "Project Infra",
|
|
||||||
"invalid" => "Invalid",
|
"invalid" => "Invalid",
|
||||||
"kernel" => "Kernel",
|
"kernel" => "Kernel",
|
||||||
"ldn" => "LDN",
|
"ldn" => "LDN",
|
||||||
@ -157,9 +147,9 @@ namespace Ryujinx.Ava.Systems
|
|||||||
"ldn-untested" => "LDN Untested",
|
"ldn-untested" => "LDN Untested",
|
||||||
"ldn-broken" => "LDN Broken",
|
"ldn-broken" => "LDN Broken",
|
||||||
"ldn-partial" => "Partial LDN",
|
"ldn-partial" => "Partial LDN",
|
||||||
"nvdec" => "NVDEC",
|
"nvdec" => "GPU Video Decoding",
|
||||||
"services" => "NX Services",
|
"services" => "HLE Services",
|
||||||
"services-horizon" => "Horizon OS Services",
|
"services-horizon" => "New HLE Services",
|
||||||
"slow" => "Runs Slow",
|
"slow" => "Runs Slow",
|
||||||
"crash" => "Crashes",
|
"crash" => "Crashes",
|
||||||
"deadlock" => "Deadlock",
|
"deadlock" => "Deadlock",
|
||||||
@ -167,7 +157,7 @@ namespace Ryujinx.Ava.Systems
|
|||||||
"opengl" => "OpenGL",
|
"opengl" => "OpenGL",
|
||||||
"opengl-backend-bug" => "OpenGL Backend Bug",
|
"opengl-backend-bug" => "OpenGL Backend Bug",
|
||||||
"vulkan-backend-bug" => "Vulkan Backend Bug",
|
"vulkan-backend-bug" => "Vulkan Backend Bug",
|
||||||
"mac-bug" => "Mac-specific Bug(s)",
|
"mac-bug" => "Mac-specific Problems",
|
||||||
"amd-vendor-bug" => "AMD GPU Bug",
|
"amd-vendor-bug" => "AMD GPU Bug",
|
||||||
"intel-vendor-bug" => "Intel GPU Bug",
|
"intel-vendor-bug" => "Intel GPU Bug",
|
||||||
"loader-allocator" => "Loader Allocator",
|
"loader-allocator" => "Loader Allocator",
|
||||||
@ -176,28 +166,17 @@ namespace Ryujinx.Ava.Systems
|
|||||||
"UE4" => "Unreal Engine 4",
|
"UE4" => "Unreal Engine 4",
|
||||||
"homebrew" => "Homebrew Content",
|
"homebrew" => "Homebrew Content",
|
||||||
"online-broken" => "Online Broken",
|
"online-broken" => "Online Broken",
|
||||||
_ => Capitalize(labelName)
|
_ => null
|
||||||
};
|
};
|
||||||
|
|
||||||
public static string Capitalize(string value)
|
|
||||||
{
|
|
||||||
if (value == string.Empty)
|
|
||||||
return string.Empty;
|
|
||||||
|
|
||||||
char firstChar = value[0];
|
|
||||||
string rest = value[1..];
|
|
||||||
|
|
||||||
return $"{char.ToUpper(firstChar)}{rest}";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct ColumnIndices(Func<ReadOnlySpan<char>, int> getIndex)
|
public struct ColumnIndices(Func<ReadOnlySpan<char>, int> getIndex)
|
||||||
{
|
{
|
||||||
public const string TitleIdCol = "\"title_id\"";
|
private const string TitleIdCol = "\"title_id\"";
|
||||||
public const string GameNameCol = "\"game_name\"";
|
private const string GameNameCol = "\"game_name\"";
|
||||||
public const string LabelsCol = "\"labels\"";
|
private const string LabelsCol = "\"labels\"";
|
||||||
public const string StatusCol = "\"status\"";
|
private const string StatusCol = "\"status\"";
|
||||||
public const string LastUpdatedCol = "\"last_updated\"";
|
private const string LastUpdatedCol = "\"last_updated\"";
|
||||||
|
|
||||||
public readonly int TitleId = getIndex(TitleIdCol);
|
public readonly int TitleId = getIndex(TitleIdCol);
|
||||||
public readonly int GameName = getIndex(GameNameCol);
|
public readonly int GameName = getIndex(GameNameCol);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user