Compare commits

...

10 Commits

Author SHA1 Message Date
Evan Husted
672f5df0f9 docs: compat: Remove issue_number & events_count columns
That's mostly for archival purposes; we don't need it.
2025-01-07 18:49:04 -06:00
Evan Husted
804d9c1efe docs: compat: remove invalid dupe 2025-01-07 06:03:35 -06:00
Evan Husted
9270b35648 no. 2025-01-07 05:53:31 -06:00
Evan Husted
5a6d01db3c docs: compat: trine 4 -> nothing
added Soul Reaver 1 & 2
2025-01-07 05:50:30 -06:00
Evan Husted
ef9c1416ec UI: compat: Only use monospaced font for title ID 2025-01-07 04:49:20 -06:00
Evan Husted
5efa7d5dfa UI: compat: remove custom ContentDialog derived type 2025-01-07 04:37:36 -06:00
Evan Husted
a82569d615 docs: compat: LEGO Horizon Adventures 2025-01-07 04:28:10 -06:00
Evan Husted
ed5832ca73 docs: compat: Add new releases to the end of the file 2025-01-07 04:21:33 -06:00
Evan Husted
574aa9ff9c add a couple missing title IDs 2025-01-07 04:21:08 -06:00
Evan Husted
8a29428de2 docs: compat: update hogwarts legacy compat 2025-01-07 03:57:13 -06:00
8 changed files with 4334 additions and 4366 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -402,7 +402,7 @@
<x:Double x:Key="ControlContentThemeFontSize">13</x:Double>
<x:Double x:Key="MenuItemHeight">26</x:Double>
<x:Double x:Key="TabItemMinHeight">28</x:Double>
<x:Double x:Key="ContentDialogMaxWidth">700</x:Double>
<x:Double x:Key="ContentDialogMaxWidth">900</x:Double>
<x:Double x:Key="ContentDialogMaxHeight">756</x:Double>
</Styles.Resources>
</Styles>

View File

@@ -171,12 +171,6 @@
<ItemGroup>
<AdditionalFiles Include="Assets\locales.json" />
</ItemGroup>
<ItemGroup>
<Compile Update="Utilities\Compat\CompatibilityContentDialog.axaml.cs">
<DependentUpon>CompatibilityContentDialog.axaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="Assets\Fonts\Mono\" />
</ItemGroup>

View File

@@ -1,20 +0,0 @@
<ui:ContentDialog xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="using:Ryujinx.Ava.Utilities.Compat"
xmlns:ui="using:FluentAvalonia.UI.Controls"
xmlns:ext="using:Ryujinx.Ava.Common.Markup"
x:Class="Ryujinx.Ava.Utilities.Compat.CompatibilityContentDialog"
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="400"
CloseButtonText="{ext:Locale SettingsButtonClose}"
DefaultButton="Close"
x:DataType="local:CompatibilityViewModel">
<ui:ContentDialog.DataContext>
<local:CompatibilityViewModel/>
</ui:ContentDialog.DataContext>
<ui:ContentDialog.Resources>
<x:Double x:Key="ContentDialogMaxWidth">900</x:Double>
</ui:ContentDialog.Resources>
</ui:ContentDialog>

View File

@@ -1,13 +0,0 @@
using FluentAvalonia.UI.Controls;
using System;
namespace Ryujinx.Ava.Utilities.Compat
{
public partial class CompatibilityContentDialog : ContentDialog
{
protected override Type StyleKeyOverride => typeof(ContentDialog);
public CompatibilityContentDialog() => InitializeComponent();
}
}

View File

@@ -3,6 +3,7 @@ using nietras.SeparatedValues;
using Ryujinx.Ava.Common.Locale;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
@@ -32,21 +33,22 @@ namespace Ryujinx.Ava.Utilities.Compat
{
public CompatibilityEntry(SepReaderHeader header, SepReader.Row row)
{
IssueNumber = row[header.IndexOf("issue_number")].Parse<int>();
var titleIdRow = row[header.IndexOf("extracted_game_id")].ToString();
if (row.ColCount != header.ColNames.Count)
throw new InvalidDataException($"CSV row {row.RowIndex} ({row.ToString()}) has mismatched column count");
var titleIdRow = ColStr(row[header.IndexOf("\"extracted_game_id\"")]);
TitleId = !string.IsNullOrEmpty(titleIdRow)
? titleIdRow
: default(Optional<string>);
var issueTitleRow = row[header.IndexOf("issue_title")].ToString();
var issueTitleRow = ColStr(row[header.IndexOf("\"issue_title\"")]);
if (TitleId.HasValue)
issueTitleRow = issueTitleRow.ReplaceIgnoreCase($" - {TitleId}", string.Empty);
GameName = issueTitleRow.Trim().Trim('"');
IssueLabels = row[header.IndexOf("issue_labels")].ToString().Split(';');
Status = row[header.IndexOf("extracted_status")].ToString().ToLower() switch
IssueLabels = ColStr(row[header.IndexOf("\"issue_labels\"")]).Split(';');
Status = ColStr(row[header.IndexOf("\"extracted_status\"")]).ToLower() switch
{
"playable" => LocaleKeys.CompatibilityListPlayable,
"ingame" => LocaleKeys.CompatibilityListIngame,
@@ -56,23 +58,23 @@ namespace Ryujinx.Ava.Utilities.Compat
_ => null
};
if (row[header.IndexOf("last_event_date")].TryParse<DateTime>(out var dt))
if (DateTime.TryParse(ColStr(row[header.IndexOf("\"last_event_date\"")]), out var dt))
LastEvent = dt;
if (row[header.IndexOf("events_count")].TryParse<int>(out var eventsCount))
EventCount = eventsCount;
return;
string ColStr(SepReader.Col col) => col.ToString().Trim('"');
}
public int IssueNumber { get; }
public string GameName { get; }
public Optional<string> TitleId { get; }
public string[] IssueLabels { get; }
public LocaleKeys? Status { get; }
public DateTime LastEvent { get; }
public int EventCount { get; }
public string LocalizedStatus => LocaleManager.Instance[Status!.Value];
public string FormattedTitleId => TitleId.OrElse(new string(' ', 16));
public string FormattedTitleId => TitleId
.OrElse(new string(' ', 16));
public string FormattedIssueLabels => IssueLabels
.Where(it => !it.StartsWithIgnoreCase("status"))
@@ -82,13 +84,11 @@ namespace Ryujinx.Ava.Utilities.Compat
public override string ToString()
{
var sb = new StringBuilder("CompatibilityEntry: {");
sb.Append($"{nameof(IssueNumber)}={IssueNumber}, ");
sb.Append($"{nameof(GameName)}=\"{GameName}\", ");
sb.Append($"{nameof(TitleId)}={TitleId}, ");
sb.Append($"{nameof(IssueLabels)}=\"{IssueLabels}\", ");
sb.Append($"{nameof(Status)}=\"{Status}\", ");
sb.Append($"{nameof(LastEvent)}=\"{LastEvent}\", ");
sb.Append($"{nameof(EventCount)}={EventCount}");
sb.Append($"{nameof(LastEvent)}=\"{LastEvent}\"");
sb.Append('}');
return sb.ToString();

View File

@@ -47,9 +47,8 @@
<Grid Width="750" ColumnDefinitions="Auto,Auto,Auto,*"
Margin="5">
<TextBlock Grid.Column="0"
FontFamily="{StaticResource JetBrainsMono}"
Text="{Binding GameName}"
Width="333"
Width="320"
TextWrapping="Wrap" />
<TextBlock Grid.Column="1"
Width="135"
@@ -60,14 +59,12 @@
<TextBlock Grid.Column="2"
Padding="7, 0"
VerticalAlignment="Center"
FontFamily="{StaticResource JetBrainsMono}"
Text="{Binding LocalizedStatus}"
Width="85"
Foreground="{Binding Status, Converter={x:Static helpers:PlayabilityStatusConverter.Shared}}"
TextWrapping="NoWrap" />
<TextBlock Grid.Column="3"
VerticalAlignment="Center"
FontFamily="{StaticResource JetBrainsMono}"
Text="{Binding FormattedIssueLabels}"
TextWrapping="WrapWithOverflow" />
</Grid>

View File

@@ -1,6 +1,8 @@
using Avalonia.Controls;
using Avalonia.Styling;
using FluentAvalonia.UI.Controls;
using nietras.SeparatedValues;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Helpers;
using System.IO;
using System.Reflection;
@@ -19,11 +21,17 @@ namespace Ryujinx.Ava.Utilities.Compat
csvStream.Position = 0;
CompatibilityCsv.Shared = new CompatibilityCsv(Sep.Reader().From(csvStream));
}
}
CompatibilityContentDialog contentDialog = new()
ContentDialog contentDialog = new()
{
Content = new CompatibilityList { DataContext = new CompatibilityViewModel(RyujinxApp.MainWindow.ViewModel.ApplicationLibrary) }
PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty,
CloseButtonText = LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
Content = new CompatibilityList
{
DataContext = new CompatibilityViewModel(RyujinxApp.MainWindow.ViewModel.ApplicationLibrary)
}
};
Style closeButton = new(x => x.Name("CloseButton"));