Compare commits
8 Commits
Canary-1.2
...
Canary-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5efa7d5dfa | ||
|
|
a82569d615 | ||
|
|
ed5832ca73 | ||
|
|
574aa9ff9c | ||
|
|
8a29428de2 | ||
|
|
f4272b05fa | ||
|
|
d8265f7772 | ||
|
|
259526430c |
4308
docs/compatibility.csv
Normal file
4308
docs/compatibility.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -402,7 +402,7 @@
|
|||||||
<x:Double x:Key="ControlContentThemeFontSize">13</x:Double>
|
<x:Double x:Key="ControlContentThemeFontSize">13</x:Double>
|
||||||
<x:Double x:Key="MenuItemHeight">26</x:Double>
|
<x:Double x:Key="MenuItemHeight">26</x:Double>
|
||||||
<x:Double x:Key="TabItemMinHeight">28</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>
|
<x:Double x:Key="ContentDialogMaxHeight">756</x:Double>
|
||||||
</Styles.Resources>
|
</Styles.Resources>
|
||||||
</Styles>
|
</Styles>
|
||||||
|
|||||||
@@ -22597,6 +22597,31 @@
|
|||||||
"zh_TW": ""
|
"zh_TW": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "CompatibilityListWarning",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "",
|
||||||
|
"de_DE": "",
|
||||||
|
"el_GR": "",
|
||||||
|
"en_US": "This compatibility list might contain out of date entries.\nDo not be opposed to testing games in the \"Ingame\" status.",
|
||||||
|
"es_ES": "",
|
||||||
|
"fr_FR": "",
|
||||||
|
"he_IL": "",
|
||||||
|
"it_IT": "",
|
||||||
|
"ja_JP": "",
|
||||||
|
"ko_KR": "",
|
||||||
|
"no_NO": "",
|
||||||
|
"pl_PL": "",
|
||||||
|
"pt_BR": "",
|
||||||
|
"ru_RU": "",
|
||||||
|
"sv_SE": "",
|
||||||
|
"th_TH": "",
|
||||||
|
"tr_TR": "",
|
||||||
|
"uk_UA": "",
|
||||||
|
"zh_CN": "",
|
||||||
|
"zh_TW": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "CompatibilityListSearchBoxWatermark",
|
"ID": "CompatibilityListSearchBoxWatermark",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
|
|||||||
@@ -145,6 +145,9 @@
|
|||||||
<EmbeddedResource Include="..\..\distribution\macos\shortcut-template.plist">
|
<EmbeddedResource Include="..\..\distribution\macos\shortcut-template.plist">
|
||||||
<Link>Assets\ShortcutFiles\shortcut-template.plist</Link>
|
<Link>Assets\ShortcutFiles\shortcut-template.plist</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\docs\compatibility.csv" LogicalName="RyujinxGameCompatibilityList">
|
||||||
|
<Link>Assets\RyujinxGameCompatibility.csv</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Assets\locales.json" />
|
<EmbeddedResource Include="Assets\locales.json" />
|
||||||
<EmbeddedResource Include="Assets\Styles\Styles.xaml" />
|
<EmbeddedResource Include="Assets\Styles\Styles.xaml" />
|
||||||
<EmbeddedResource Include="Assets\Icons\Controller_JoyConLeft.svg" />
|
<EmbeddedResource Include="Assets\Icons\Controller_JoyConLeft.svg" />
|
||||||
@@ -168,12 +171,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AdditionalFiles Include="Assets\locales.json" />
|
<AdditionalFiles Include="Assets\locales.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="Utilities\Compat\CompatibilityContentDialog.axaml.cs">
|
|
||||||
<DependentUpon>CompatibilityContentDialog.axaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Assets\Fonts\Mono\" />
|
<Folder Include="Assets\Fonts\Mono\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||||||
public static MiniCommand Create(Action callback) => new MiniCommand<object>(_ => callback());
|
public static MiniCommand Create(Action callback) => new MiniCommand<object>(_ => callback());
|
||||||
public static MiniCommand Create<TArg>(Action<TArg> callback) => new MiniCommand<TArg>(callback);
|
public static MiniCommand Create<TArg>(Action<TArg> callback) => new MiniCommand<TArg>(callback);
|
||||||
public static MiniCommand CreateFromTask(Func<Task> callback) => new MiniCommand<object>(_ => callback());
|
public static MiniCommand CreateFromTask(Func<Task> callback) => new MiniCommand<object>(_ => callback());
|
||||||
|
public static MiniCommand CreateFromTask<TArg>(Func<TArg, Task> callback) => new MiniCommand<TArg>(callback);
|
||||||
|
|
||||||
public abstract bool CanExecute(object parameter);
|
public abstract bool CanExecute(object parameter);
|
||||||
public abstract void Execute(object parameter);
|
public abstract void Execute(object parameter);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Layout;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using Gommon;
|
using Gommon;
|
||||||
@@ -42,7 +42,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
OpenSettingsMenuItem.Command = new AsyncRelayCommand(OpenSettings);
|
OpenSettingsMenuItem.Command = new AsyncRelayCommand(OpenSettings);
|
||||||
PauseEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Pause());
|
PauseEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Pause());
|
||||||
ResumeEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Resume());
|
ResumeEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Resume());
|
||||||
StopEmulationMenuItem.Command = new AsyncRelayCommand(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted()!);
|
StopEmulationMenuItem.Command = new AsyncRelayCommand(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
|
||||||
CheatManagerMenuItem.Command = new AsyncRelayCommand(OpenCheatManagerForCurrentApp);
|
CheatManagerMenuItem.Command = new AsyncRelayCommand(OpenCheatManagerForCurrentApp);
|
||||||
InstallFileTypesMenuItem.Command = new AsyncRelayCommand(InstallFileTypes);
|
InstallFileTypesMenuItem.Command = new AsyncRelayCommand(InstallFileTypes);
|
||||||
UninstallFileTypesMenuItem.Command = new AsyncRelayCommand(UninstallFileTypes);
|
UninstallFileTypesMenuItem.Command = new AsyncRelayCommand(UninstallFileTypes);
|
||||||
@@ -66,7 +66,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
WindowSize2160PMenuItem.Command = new RelayCommand<string>(ChangeWindowSize);
|
WindowSize2160PMenuItem.Command = new RelayCommand<string>(ChangeWindowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
private CheckBox[] GenerateToggleFileTypeItems() =>
|
private IEnumerable<CheckBox> GenerateToggleFileTypeItems() =>
|
||||||
Enum.GetValues<FileTypes>()
|
Enum.GetValues<FileTypes>()
|
||||||
.Select(it => (FileName: Enum.GetName(it)!, FileType: it))
|
.Select(it => (FileName: Enum.GetName(it)!, FileType: it))
|
||||||
.Select(it =>
|
.Select(it =>
|
||||||
@@ -76,15 +76,13 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
IsChecked = it.FileType.GetConfigValue(ConfigurationState.Instance.UI.ShownFileTypes),
|
IsChecked = it.FileType.GetConfigValue(ConfigurationState.Instance.UI.ShownFileTypes),
|
||||||
Command = MiniCommand.Create(() => Window.ToggleFileType(it.FileName))
|
Command = MiniCommand.Create(() => Window.ToggleFileType(it.FileName))
|
||||||
}
|
}
|
||||||
).ToArray();
|
);
|
||||||
|
|
||||||
private static MenuItem[] GenerateLanguageMenuItems()
|
private static IEnumerable<MenuItem> GenerateLanguageMenuItems()
|
||||||
{
|
{
|
||||||
List<MenuItem> menuItems = new();
|
const string LocalePath = "Ryujinx/Assets/locales.json";
|
||||||
|
|
||||||
string localePath = "Ryujinx/Assets/locales.json";
|
string languageJson = EmbeddedResources.ReadAllText(LocalePath);
|
||||||
|
|
||||||
string languageJson = EmbeddedResources.ReadAllText(localePath);
|
|
||||||
|
|
||||||
LocalesJson locales = JsonHelper.Deserialize(languageJson, LocalesJsonContext.Default.LocalesJson);
|
LocalesJson locales = JsonHelper.Deserialize(languageJson, LocalesJsonContext.Default.LocalesJson);
|
||||||
|
|
||||||
@@ -99,20 +97,23 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
languageName = locales.Locales[index].Translations[language] == "" ? language : locales.Locales[index].Translations[language];
|
string tr = locales.Locales[index].Translations[language];
|
||||||
|
languageName = string.IsNullOrEmpty(tr)
|
||||||
|
? language
|
||||||
|
: tr;
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem menuItem = new()
|
MenuItem menuItem = new()
|
||||||
{
|
{
|
||||||
Padding = new Thickness(10, 0, 0, 0),
|
Padding = new Thickness(15, 0, 0, 0),
|
||||||
Header = " " + languageName,
|
Margin = new Thickness(3, 0, 3, 0),
|
||||||
|
HorizontalAlignment = HorizontalAlignment.Stretch,
|
||||||
|
Header = languageName,
|
||||||
Command = MiniCommand.Create(() => MainWindowViewModel.ChangeLanguage(language))
|
Command = MiniCommand.Create(() => MainWindowViewModel.ChangeLanguage(language))
|
||||||
};
|
};
|
||||||
|
|
||||||
menuItems.Add(menuItem);
|
yield return menuItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
return menuItems.ToArray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
|
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
|
||||||
|
|||||||
@@ -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>
|
|
||||||
|
|
||||||
@@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
using Gommon;
|
|
||||||
using nietras.SeparatedValues;
|
|
||||||
using Ryujinx.Common.Configuration;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.Utilities.Compat
|
|
||||||
{
|
|
||||||
public static class CompatibilityHelper
|
|
||||||
{
|
|
||||||
private static readonly string _downloadUrl =
|
|
||||||
"https://gist.githubusercontent.com/ezhevita/b41ed3bf64d0cc01269cab036e884f3d/raw/002b1a1c1a5f7a83276625e8c479c987a5f5b722/Ryujinx%2520Games%2520List%2520Compatibility.csv";
|
|
||||||
|
|
||||||
private static readonly FilePath _compatCsvPath = new FilePath(AppDataManager.BaseDirPath) / "system" / "compatibility.csv";
|
|
||||||
|
|
||||||
public static async Task<SepReader> DownloadAsync()
|
|
||||||
{
|
|
||||||
if (_compatCsvPath.ExistsAsFile)
|
|
||||||
return Sep.Reader().FromFile(_compatCsvPath.Path);
|
|
||||||
|
|
||||||
using var httpClient = new HttpClient();
|
|
||||||
var compatCsv = await httpClient.GetStringAsync(_downloadUrl);
|
|
||||||
_compatCsvPath.WriteAllText(compatCsv);
|
|
||||||
return Sep.Reader().FromText(compatCsv);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async Task InitAsync()
|
|
||||||
{
|
|
||||||
CompatibilityCsv.Shared = new CompatibilityCsv(await DownloadAsync());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
xmlns:local="using:Ryujinx.Ava.Utilities.Compat"
|
xmlns:local="using:Ryujinx.Ava.Utilities.Compat"
|
||||||
xmlns:helpers="using:Ryujinx.Ava.UI.Helpers"
|
xmlns:helpers="using:Ryujinx.Ava.UI.Helpers"
|
||||||
xmlns:ext="using:Ryujinx.Ava.Common.Markup"
|
xmlns:ext="using:Ryujinx.Ava.Common.Markup"
|
||||||
|
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Ryujinx.Ava.Utilities.Compat.CompatibilityList"
|
x:Class="Ryujinx.Ava.Utilities.Compat.CompatibilityList"
|
||||||
@@ -11,13 +12,33 @@
|
|||||||
<UserControl.DataContext>
|
<UserControl.DataContext>
|
||||||
<local:CompatibilityViewModel />
|
<local:CompatibilityViewModel />
|
||||||
</UserControl.DataContext>
|
</UserControl.DataContext>
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid RowDefinitions="*,Auto,*">
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="*,Auto,Auto">
|
<Grid
|
||||||
|
Grid.Row="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
ColumnDefinitions="Auto,*"
|
||||||
|
Margin="0 0 0 10">
|
||||||
|
<ui:FontIcon
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
FontFamily="avares://FluentAvalonia/Fonts#Symbols"
|
||||||
|
Glyph="{helpers:GlyphValueConverter Important}" />
|
||||||
|
<!-- NOTE: aligning to bottom for better visual alignment with glyph -->
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="5, 0, 0, 0"
|
||||||
|
FontStyle="Italic"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="{ext:Locale CompatibilityListWarning}" />
|
||||||
|
</Grid>
|
||||||
|
<Grid Grid.Row="1" ColumnDefinitions="*,Auto,Auto">
|
||||||
<TextBox Grid.Column="0" HorizontalAlignment="Stretch" Watermark="{ext:Locale CompatibilityListSearchBoxWatermark}" TextChanged="TextBox_OnTextChanged" />
|
<TextBox Grid.Column="0" HorizontalAlignment="Stretch" Watermark="{ext:Locale CompatibilityListSearchBoxWatermark}" TextChanged="TextBox_OnTextChanged" />
|
||||||
<CheckBox Grid.Column="1" Margin="7, 0, 0, 0" IsChecked="{Binding OnlyShowOwnedGames}" />
|
<CheckBox Grid.Column="1" Margin="7, 0, 0, 0" IsChecked="{Binding OnlyShowOwnedGames}" />
|
||||||
<TextBlock Grid.Column="2" Margin="-10, 0, 0, 0" Text="{ext:Locale CompatibilityListOnlyShowOwnedGames}" />
|
<TextBlock Grid.Column="2" Margin="-10, 0, 0, 0" Text="{ext:Locale CompatibilityListOnlyShowOwnedGames}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<ScrollViewer Grid.Row="1">
|
<ScrollViewer Grid.Row="2">
|
||||||
<ListBox Margin="0,5, 0, 0"
|
<ListBox Margin="0,5, 0, 0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
ItemsSource="{Binding CurrentEntries}">
|
ItemsSource="{Binding CurrentEntries}">
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Styling;
|
using Avalonia.Styling;
|
||||||
|
using FluentAvalonia.UI.Controls;
|
||||||
|
using nietras.SeparatedValues;
|
||||||
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.Utilities.Compat
|
namespace Ryujinx.Ava.Utilities.Compat
|
||||||
@@ -9,11 +14,24 @@ namespace Ryujinx.Ava.Utilities.Compat
|
|||||||
{
|
{
|
||||||
public static async Task Show()
|
public static async Task Show()
|
||||||
{
|
{
|
||||||
await CompatibilityHelper.InitAsync();
|
if (CompatibilityCsv.Shared is null)
|
||||||
|
|
||||||
CompatibilityContentDialog contentDialog = new()
|
|
||||||
{
|
{
|
||||||
Content = new CompatibilityList { DataContext = new CompatibilityViewModel(RyujinxApp.MainWindow.ViewModel.ApplicationLibrary) }
|
await using Stream csvStream = Assembly.GetExecutingAssembly()
|
||||||
|
.GetManifestResourceStream("RyujinxGameCompatibilityList")!;
|
||||||
|
csvStream.Position = 0;
|
||||||
|
|
||||||
|
CompatibilityCsv.Shared = new CompatibilityCsv(Sep.Reader().From(csvStream));
|
||||||
|
}
|
||||||
|
|
||||||
|
ContentDialog contentDialog = new()
|
||||||
|
{
|
||||||
|
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"));
|
Style closeButton = new(x => x.Name("CloseButton"));
|
||||||
|
|||||||
Reference in New Issue
Block a user