mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-03-13 02:39:39 -05:00
added the rest of compat list
This commit is contained in:
parent
85f3a10ae9
commit
1140ee409d
@ -6,6 +6,9 @@
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary>
|
||||
<FontFamily x:Key="JetBrainsMono">avares://Ryujinx/Assets/Fonts/Mono/#JetBrains Mono</FontFamily>
|
||||
</ResourceDictionary>
|
||||
<MergeResourceInclude Source="/Assets/Styles/Themes.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@ -14,4 +17,4 @@
|
||||
<sty:FluentAvaloniaTheme PreferSystemTheme="False" />
|
||||
<StyleInclude Source="/Assets/Styles/Styles.xaml"/>
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
</Application>
|
||||
|
10
src/Ryujinx/Assets/Fonts/Mono/AUTHORS.txt
Normal file
10
src/Ryujinx/Assets/Fonts/Mono/AUTHORS.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# This is the official list of project authors for copyright purposes.
|
||||
# This file is distinct from the CONTRIBUTORS.txt file.
|
||||
# See the latter for an explanation.
|
||||
#
|
||||
# Names should be added to this file as:
|
||||
# Name or Organization <email address>
|
||||
|
||||
JetBrains <>
|
||||
Philipp Nurullin <philipp.nurullin@jetbrains.com>
|
||||
Konstantin Bulenkov <kb@jetbrains.com>
|
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-Bold.ttf
Normal file
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-Bold.ttf
Normal file
Binary file not shown.
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-BoldItalic.ttf
Normal file
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-Italic.ttf
Normal file
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-Italic.ttf
Normal file
Binary file not shown.
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-Regular.ttf
Normal file
BIN
src/Ryujinx/Assets/Fonts/Mono/JetBrainsMonoNL-Regular.ttf
Normal file
Binary file not shown.
93
src/Ryujinx/Assets/Fonts/Mono/OFL.txt
Normal file
93
src/Ryujinx/Assets/Fonts/Mono/OFL.txt
Normal file
@ -0,0 +1,93 @@
|
||||
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
@ -798,7 +798,7 @@
|
||||
"MultiplayerModeLdnMitm": "ldn_mitm",
|
||||
"CompatibilityListOpen": "Open Compatibility List",
|
||||
"CompatibilityListLastUpdated": "Last updated: {0}",
|
||||
"CompatibilityListWarning": "This compatibility list might contain out of date entries.\\nDo not be opposed to testing games in the \"Ingame\" status.",
|
||||
"CompatibilityListWarning": "This compatibility list might contain out of date entries.\nDo not be opposed to testing games in the \"Ingame\" status.",
|
||||
"CompatibilityListSearchBoxWatermark": "Search compatibility entries...",
|
||||
"CompatibilityListOnlyShowOwnedGames": "Only show owned games",
|
||||
"CompatibilityListPlayable": "Playable",
|
||||
|
@ -389,7 +389,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">600</x:Double>
|
||||
<x:Double x:Key="ContentDialogMaxWidth">900</x:Double>
|
||||
<x:Double x:Key="ContentDialogMaxHeight">756</x:Double>
|
||||
</Styles.Resources>
|
||||
</Styles>
|
||||
|
@ -77,6 +77,18 @@ namespace Ryujinx.Ava.Modules.Compatibility
|
||||
}
|
||||
|
||||
public string GameName { get; }
|
||||
|
||||
public bool CheckTitleId(Func<string, bool> checker) => TitleId is not null && checker(TitleId);
|
||||
|
||||
public bool MatchesId(string titleId) =>
|
||||
TitleId is not null && TitleId.Equals(titleId, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public bool NearMatchesId(string titleId) =>
|
||||
TitleId is not null && TitleId.Contains(titleId, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public bool MatchesAnyId(params string[] titleIds) =>
|
||||
TitleId is not null && titleIds.Any(it => TitleId.Equals(it, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
public string TitleId { get; }
|
||||
public string[] Labels { get; }
|
||||
internal LocaleKeys? Status { get; }
|
||||
|
@ -102,6 +102,10 @@
|
||||
<AvaloniaResource Include="UI\**\*.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</AvaloniaResource>
|
||||
<AvaloniaResource Include="Assets\Fonts\Mono\JetBrainsMonoNL-Bold.ttf" />
|
||||
<AvaloniaResource Include="Assets\Fonts\Mono\JetBrainsMonoNL-BoldItalic.ttf" />
|
||||
<AvaloniaResource Include="Assets\Fonts\Mono\JetBrainsMonoNL-Italic.ttf" />
|
||||
<AvaloniaResource Include="Assets\Fonts\Mono\JetBrainsMonoNL-Regular.ttf" />
|
||||
<AvaloniaResource Include="Assets\Fonts\SegoeFluentIcons.ttf" />
|
||||
<AvaloniaResource Include="Assets\Styles\Themes.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
73
src/Ryujinx/UI/Controls/CompatibilityList.axaml
Normal file
73
src/Ryujinx/UI/Controls/CompatibilityList.axaml
Normal file
@ -0,0 +1,73 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:vm="using:Ryujinx.Ava.UI.ViewModels"
|
||||
xmlns:helpers="using:Ryujinx.Ava.UI.Helpers"
|
||||
xmlns:locale="using:Ryujinx.Ava.Common.Locale"
|
||||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:compatibility="clr-namespace:Ryujinx.Ava.Modules.Compatibility"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Ryujinx.UI.Controls.CompatibilityList"
|
||||
x:DataType="vm:CompatibilityViewModel">
|
||||
<UserControl.DataContext>
|
||||
<vm:CompatibilityViewModel />
|
||||
</UserControl.DataContext>
|
||||
<Grid RowDefinitions="*,Auto,*">
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Center"
|
||||
ColumnDefinitions="Auto,*"
|
||||
Margin="0 0 0 10">
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="5, 0, 0, 0"
|
||||
FontStyle="Italic"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"
|
||||
Text="{locale:Locale CompatibilityListWarning}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="1" ColumnDefinitions="*,Auto,Auto">
|
||||
<TextBox Grid.Column="0" HorizontalAlignment="Stretch" Watermark="{locale:Locale CompatibilityListSearchBoxWatermark}" TextChanged="TextBox_OnTextChanged" />
|
||||
<CheckBox Grid.Column="1" Margin="7, 0, 0, 0" IsChecked="{Binding OnlyShowOwnedGames}" />
|
||||
<TextBlock Grid.Column="2" Margin="-10, 0, 0, 0" Text="{locale:Locale CompatibilityListOnlyShowOwnedGames}" />
|
||||
</Grid>
|
||||
<ScrollViewer Grid.Row="2">
|
||||
<ListBox Margin="0,5, 0, 0"
|
||||
Background="Transparent"
|
||||
ItemsSource="{Binding CurrentEntries}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type compatibility:CompatibilityEntry}">
|
||||
<Grid Width="750"
|
||||
Margin="5"
|
||||
ColumnDefinitions="Auto,Auto,Auto,*"
|
||||
Background="Transparent"
|
||||
ToolTip.Tip="{Binding LocalizedLastUpdated}">
|
||||
<TextBlock Grid.Column="0"
|
||||
Text="{Binding GameName}"
|
||||
Width="320"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock Grid.Column="1"
|
||||
Width="135"
|
||||
Padding="7, 0, 0, 0"
|
||||
FontFamily="{StaticResource JetBrainsMono}"
|
||||
Text="{Binding FormattedTitleId}"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock Grid.Column="2"
|
||||
Padding="7, 0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding LocalizedStatus}"
|
||||
Width="85"
|
||||
Foreground="{Binding Status, Converter={x:Static helpers:PlayabilityStatusConverter.Shared}}"
|
||||
TextWrapping="NoWrap" />
|
||||
<TextBlock Grid.Column="3"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FormattedIssueLabels}"
|
||||
TextWrapping="WrapWithOverflow" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
61
src/Ryujinx/UI/Controls/CompatibilityList.axaml.cs
Normal file
61
src/Ryujinx/UI/Controls/CompatibilityList.axaml.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Styling;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Ava.UI.Windows;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.UI.Controls
|
||||
{
|
||||
public partial class CompatibilityList : UserControl
|
||||
{
|
||||
public static async Task Show()
|
||||
{
|
||||
var mainWindow = ((Application.Current?.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime)?.MainWindow as MainWindow);
|
||||
|
||||
ContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = string.Empty,
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
|
||||
Content = new CompatibilityList
|
||||
{
|
||||
DataContext = new CompatibilityViewModel(mainWindow!.ViewModel.Applications)
|
||||
}
|
||||
};
|
||||
|
||||
Style closeButton = new(x => x.Name("CloseButton"));
|
||||
closeButton.Setters.Add(new Setter(WidthProperty, 80d));
|
||||
|
||||
Style closeButtonParent = new(x => x.Name("CommandSpace"));
|
||||
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty, Avalonia.Layout.HorizontalAlignment.Right));
|
||||
|
||||
contentDialog.Styles.Add(closeButton);
|
||||
contentDialog.Styles.Add(closeButtonParent);
|
||||
|
||||
await ContentDialogHelper.ShowAsync(contentDialog);
|
||||
}
|
||||
|
||||
public CompatibilityList()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void TextBox_OnTextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (DataContext is not CompatibilityViewModel cvm)
|
||||
return;
|
||||
|
||||
if (sender is not TextBox searchBox)
|
||||
return;
|
||||
|
||||
cvm.Search(searchBox.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
27
src/Ryujinx/UI/Helpers/PlayabilityStatusConverter.cs
Normal file
27
src/Ryujinx/UI/Helpers/PlayabilityStatusConverter.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
public class PlayabilityStatusConverter : IValueConverter
|
||||
{
|
||||
private static readonly Lazy<PlayabilityStatusConverter> _shared = new(() => new());
|
||||
public static PlayabilityStatusConverter Shared => _shared.Value;
|
||||
|
||||
public object Convert(object value, Type _, object __, CultureInfo ___)
|
||||
=> ((LocaleKeys)value) switch
|
||||
{
|
||||
LocaleKeys.CompatibilityListNothing or
|
||||
LocaleKeys.CompatibilityListBoots or
|
||||
LocaleKeys.CompatibilityListMenus => Brushes.Red,
|
||||
LocaleKeys.CompatibilityListIngame => Brushes.Yellow,
|
||||
_ => Brushes.ForestGreen
|
||||
};
|
||||
|
||||
public object ConvertBack(object value, Type _, object __, CultureInfo ___)
|
||||
=> throw new NotSupportedException();
|
||||
}
|
||||
}
|
58
src/Ryujinx/UI/ViewModels/CompatibilityViewModel.cs
Normal file
58
src/Ryujinx/UI/ViewModels/CompatibilityViewModel.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using Ryujinx.Ava.Modules.Compatibility;
|
||||
using Ryujinx.UI.App.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
public class CompatibilityViewModel : BaseModel
|
||||
{
|
||||
private bool _onlyShowOwnedGames = true;
|
||||
|
||||
public bool OnlyShowOwnedGames
|
||||
{
|
||||
get => _onlyShowOwnedGames;
|
||||
set
|
||||
{
|
||||
_onlyShowOwnedGames = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(CurrentEntries));
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<CompatibilityEntry> _currentEntries = CompatibilityCsv.Entries;
|
||||
private readonly string[] _ownedGameTitleIds = [];
|
||||
|
||||
public IEnumerable<CompatibilityEntry> CurrentEntries => OnlyShowOwnedGames
|
||||
? _currentEntries.Where(x => x.MatchesAnyId(_ownedGameTitleIds))
|
||||
: _currentEntries;
|
||||
|
||||
public CompatibilityViewModel() {}
|
||||
|
||||
public CompatibilityViewModel(ObservableCollection<ApplicationData> appLibraryApps)
|
||||
{
|
||||
_ownedGameTitleIds = appLibraryApps.Select(x => x.Id.ToString("X16")).ToArray();
|
||||
}
|
||||
|
||||
public void Search(string searchTerm)
|
||||
{
|
||||
if (string.IsNullOrEmpty(searchTerm))
|
||||
{
|
||||
SetEntries(CompatibilityCsv.Entries);
|
||||
return;
|
||||
}
|
||||
|
||||
SetEntries(CompatibilityCsv.Entries.Where(x =>
|
||||
x.GameName.Contains(searchTerm, StringComparison.OrdinalIgnoreCase)
|
||||
|| x.NearMatchesId(searchTerm)));
|
||||
}
|
||||
|
||||
private void SetEntries(IEnumerable<CompatibilityEntry> entries)
|
||||
{
|
||||
_currentEntries = entries.ToList();
|
||||
OnPropertyChanged(nameof(CurrentEntries));
|
||||
}
|
||||
}
|
||||
}
|
@ -206,6 +206,9 @@
|
||||
Click="OpenAboutWindow"
|
||||
Header="{locale:Locale MenuBarHelpAbout}"
|
||||
ToolTip.Tip="{locale:Locale OpenAboutTooltip}" />
|
||||
<MenuItem
|
||||
Click="OpenCompatibilityList"
|
||||
Header="{locale:Locale CompatibilityListOpen}" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</DockPanel>
|
||||
|
@ -15,6 +15,7 @@ using Ryujinx.UI.App.Common;
|
||||
using Ryujinx.UI.Common;
|
||||
using Ryujinx.UI.Common.Configuration;
|
||||
using Ryujinx.UI.Common.Helper;
|
||||
using Ryujinx.UI.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -266,6 +267,11 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||
{
|
||||
await AboutWindow.Show();
|
||||
}
|
||||
|
||||
public async void OpenCompatibilityList(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await CompatibilityList.Show();
|
||||
}
|
||||
|
||||
public void CloseWindow(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user