Merge branch ryujinx:master into various-ui-fixes-and-improvements

This commit is contained in:
TheToid 2025-05-20 05:05:49 -05:00
commit 20e6c035e8
13 changed files with 131 additions and 40 deletions

View file

@ -1947,6 +1947,31 @@
"zh_TW": "LDN 上在線的玩家數量: {0}" "zh_TW": "LDN 上在線的玩家數量: {0}"
} }
}, },
{
"ID": "GameListLabelTotalTimePlayed",
"Translations": {
"ar_SA": "",
"de_DE": "Gesamte Spielzeit: {0}",
"el_GR": "Συνολικός χρόνος παιχνιδιού: {0}",
"en_US": "Total Play Time: {0}",
"es_ES": "Tiempo total de juego: {0}",
"fr_FR": "Temps de jeu total: {0}",
"he_IL": "",
"it_IT": "Tempo totale di gioco: {0}",
"ja_JP": "",
"ko_KR": "",
"no_NO": "",
"pl_PL": "Całkowity czas gry: {0}",
"pt_BR": "Tempo total de jogo: {0}",
"ru_RU": "",
"sv_SE": "",
"th_TH": "",
"tr_TR": "Toplam Oyun Süresi: {0}",
"uk_UA": "",
"zh_CN": "",
"zh_TW": ""
}
},
{ {
"ID": "GameListContextMenuOpenUserSaveDirectory", "ID": "GameListContextMenuOpenUserSaveDirectory",
"Translations": { "Translations": {
@ -15528,23 +15553,23 @@
"ar_SA": "", "ar_SA": "",
"de_DE": "", "de_DE": "",
"el_GR": "", "el_GR": "",
"en_US": "Ryujinx is an emulator for the Nintendo Switch™.\nGet all the latest news in our Discord.\nDevelopers interested in contributing can find out more on our GitHub or Discord.", "en_US": "Ryujinx is an emulator for the Nintendo Switch™ 1.\nGet all the latest news in our Discord.\nDevelopers interested in contributing can find out more on our GitLab or Discord.",
"es_ES": "", "es_ES": "",
"fr_FR": "Ryujinx est un émulateur pour la Nintendo Switch™.\nObtenez le dernières nouvelles sur le Discord.\nLes développeurs qui veulent contribuer peuvent en savoir plus sur notre GitHub ou Discord.", "fr_FR": "Ryujinx est un émulateur pour la Nintendo Switch™ 1.\nObtenez le dernières nouvelles sur le Discord.\nLes développeurs qui veulent contribuer peuvent en savoir plus sur notre GitLab ou Discord.",
"he_IL": "", "he_IL": "",
"it_IT": "Ryujinx è un emulatore della console Nintendo Switch™.\nRimani aggiornato sulle ultime novità nel nostro server Discord.\nGli sviluppatori interessati a contribuire possono trovare maggiori informazioni su Discord o sulla nostra pagina GitHub.", "it_IT": "Ryujinx è un emulatore della console Nintendo Switch™ 1.\nRimani aggiornato sulle ultime novità nel nostro server Discord.\nGli sviluppatori interessati a contribuire possono trovare maggiori informazioni su Discord o sulla nostra pagina GitLab.",
"ja_JP": "", "ja_JP": "",
"ko_KR": "Ryujinx는 Nintendo Switch™용 에뮬레이터입니다.\n모든 최신 소식을 Discord에서 확인하세요.\n기여에 관심이 있는 개발자는 GitHub 또는 Discord에서 자세한 내용을 확인할 수 있습니다.", "ko_KR": "Ryujinx는 Nintendo Switch™ 1용 에뮬레이터입니다.\n모든 최신 소식을 Discord에서 확인하세요.\n기여에 관심이 있는 개발자는 GitLab 또는 Discord에서 자세한 내용을 확인할 수 있습니다.",
"no_NO": "Ryujinx er en emulator for Nintendo SwitchTM.\nVennligst støtt oss på Patreon.\nFå alle de siste nyhetene på vår Twitter eller Discord.\nUtviklere som er interessert i å bidra kan finne ut mer på GitHub eller Discord.", "no_NO": "Ryujinx er en emulator for Nintendo Switch™ 1\nVennligst støtt oss på Patreon.\nFå alle de siste nyhetene på vår Twitter eller Discord.\nUtviklere som er interessert i å bidra kan finne ut mer på GitLab eller Discord.",
"pl_PL": "", "pl_PL": "",
"pt_BR": "Ryujinx é um emulador de Nintendo Switch™.\nReceba todas as últimas notícias em nosso Discord.\nDesenvolvedores interessados em contribuir podem descobrir mais em nosso GitHub ou Discord.", "pt_BR": "Ryujinx é um emulador de Nintendo Switch™ 1.\nReceba todas as últimas notícias em nosso Discord.\nDesenvolvedores interessados em contribuir podem descobrir mais em nosso GitLab ou Discord.",
"ru_RU": "Ryujinx - это эмулятор для Nintendo Switch™.\nПолучайте все последние новости разработки в нашем Discord.\nРазработчики, заинтересованные в участии, могут узнать больше на нашем GitHub или Discord.", "ru_RU": "Ryujinx - это эмулятор для Nintendo Switch™ 1.\nПолучайте все последние новости разработки в нашем Discord.\nРазработчики, заинтересованные в участии, могут узнать больше на нашем GitLab или Discord.",
"sv_SE": "Ryujinx är en emulator för Nintendo Switch™.\nFå de senaste nyheterna via vår Discord.\nUtvecklare som är intresserade att bidra kan hitta mer info på vår GitHub eller Discord.", "sv_SE": "Ryujinx är en emulator för Nintendo Switch™ 1.\nFå de senaste nyheterna via vår Discord.\nUtvecklare som är intresserade att bidra kan hitta mer info på vår GitLab eller Discord.",
"th_TH": "", "th_TH": "",
"tr_TR": "", "tr_TR": "",
"uk_UA": "Ryujinx — це емулятор для Nintendo Switch™.\nОстанні новини можна отримати в нашому Discord.\nРозробники, що бажають долучитись до розробки та зробити свій внесок, можуть отримати більше інформації на нашому GitHub або в Discord.", "uk_UA": "Ryujinx — це емулятор для Nintendo Switch™ 1.\nОстанні новини можна отримати в нашому Discord.\nРозробники, що бажають долучитись до розробки та зробити свій внесок, можуть отримати більше інформації на нашому GitLab або в Discord.",
"zh_CN": "Ryujinx 是一个 Nintendo Switch™ 模拟器。\n有兴趣做出贡献的开发者可以在我们的 GitHub 或 Discord 上了解更多信息。\n", "zh_CN": "Ryujinx 是一个 Nintendo Switch™ 1 模拟器。\n有兴趣做出贡献的开发者可以在我们的 GitLab 或 Discord 上了解更多信息。\n",
"zh_TW": "Ryujinx 是一款 Nintendo Switch™ 模擬器。\n關注我們的 Discord 取得所有最新消息。\n對於有興趣貢獻的開發者可以在我們的 GitHub 或 Discord 上了解更多資訊。" "zh_TW": "Ryujinx 是一款 Nintendo Switch™ 1 模擬器。\n關注我們的 Discord 取得所有最新消息。\n對於有興趣貢獻的開發者可以在我們的 GitLab 或 Discord 上了解更多資訊。"
} }
}, },
{ {
@ -23300,26 +23325,26 @@
{ {
"ID": "AboutChangelogButton", "ID": "AboutChangelogButton",
"Translations": { "Translations": {
"ar_SA": "عرض سجل التغييرات على غيت هاب", "ar_SA": "",
"de_DE": "Changelog in GitHub öffnen", "de_DE": "",
"el_GR": "Προβολή αρχείου αλλαγών στο GitHub", "el_GR": "",
"en_US": "View Changelog on GitHub", "en_US": "View Changelog",
"es_ES": "Ver registro de cambios en GitHub", "es_ES": "",
"fr_FR": "Voir le Changelog sur GitHub", "fr_FR": "",
"he_IL": "צפה במידע אודות שינויים בגיטהב", "he_IL": "",
"it_IT": "Visualizza changelog su GitHub", "it_IT": "",
"ja_JP": "GitHub で更新履歴を表示", "ja_JP": "",
"ko_KR": "GitHub에서 변경 내역 보기", "ko_KR": "",
"no_NO": "Vis endringslogg på GitHub", "no_NO": "",
"pl_PL": "Zobacz listę zmian na GitHubie", "pl_PL": "",
"pt_BR": "Ver Mudanças no GitHub", "pt_BR": "",
"ru_RU": "Показать список изменений на GitHub", "ru_RU": "",
"sv_SE": "Visa ändringslogg på GitHub", "sv_SE": "",
"th_TH": "ดูประวัติการเปลี่ยนแปลงบน GitHub", "th_TH": "ด",
"tr_TR": "GitHub'da Değişiklikleri Görüntüle", "tr_TR": "",
"uk_UA": "Переглянути журнал змін на GitHub", "uk_UA": "",
"zh_CN": "在 Github 上查看更新日志", "zh_CN": "",
"zh_TW": "在 GitHub 上檢視更新日誌" "zh_TW": ""
} }
}, },
{ {

View file

@ -331,7 +331,8 @@ namespace Ryujinx.Graphics.Shader.Instructions
{ {
context.GetOp<InstVotevtg>(); context.GetOp<InstVotevtg>();
context.TranslatorContext.GpuAccessor.Log("Shader instruction Votevtg is not implemented."); // This instruction is proprietary and will not be implemented. Commenting it out to avoid false reports.
//context.TranslatorContext.GpuAccessor.Log("Shader instruction Votevtg is not implemented.");
} }
public static void Vset(EmitterContext context) public static void Vset(EmitterContext context)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -170,7 +170,8 @@
<EmbeddedResource Include="Assets\UIImages\Logo_Amiibo.png" /> <EmbeddedResource Include="Assets\UIImages\Logo_Amiibo.png" />
<EmbeddedResource Include="Assets\UIImages\Logo_Discord_Dark.png" /> <EmbeddedResource Include="Assets\UIImages\Logo_Discord_Dark.png" />
<EmbeddedResource Include="Assets\UIImages\Logo_Discord_Light.png" /> <EmbeddedResource Include="Assets\UIImages\Logo_Discord_Light.png" />
<EmbeddedResource Include="Assets\UIImages\Logo_GitLab.png" /> <EmbeddedResource Include="Assets\UIImages\Logo_GitLab_Dark.png" />
<EmbeddedResource Include="Assets\UIImages\Logo_GitLab_Light.png" />
<EmbeddedResource Include="Assets\UIImages\Logo_Ryujinx.png" /> <EmbeddedResource Include="Assets\UIImages\Logo_Ryujinx.png" />
<EmbeddedResource Include="Assets\UIImages\Logo_Ryujinx_AntiAlias.png" /> <EmbeddedResource Include="Assets\UIImages\Logo_Ryujinx_AntiAlias.png" />
</ItemGroup> </ItemGroup>

View file

@ -51,6 +51,26 @@ namespace Ryujinx.Ava.Systems.AppLibrary
public readonly IObservableCache<(TitleUpdateModel TitleUpdate, bool IsSelected), TitleUpdateModel> TitleUpdates; public readonly IObservableCache<(TitleUpdateModel TitleUpdate, bool IsSelected), TitleUpdateModel> TitleUpdates;
public readonly IObservableCache<(DownloadableContentModel Dlc, bool IsEnabled), DownloadableContentModel> DownloadableContents; public readonly IObservableCache<(DownloadableContentModel Dlc, bool IsEnabled), DownloadableContentModel> DownloadableContents;
private Gommon.Optional<TimeSpan> _totalTimePlayed;
public Gommon.Optional<TimeSpan> TotalTimePlayed
{
get => _totalTimePlayed;
private set
{
_totalTimePlayed = value;
_totalTimePlayedChanged.Call(value);
}
}
public event Action<Gommon.Optional<TimeSpan>> TotalTimePlayedRecalculated
{
add => _totalTimePlayedChanged.Add(value);
remove => _totalTimePlayedChanged.Remove(value);
}
private readonly Event<Gommon.Optional<TimeSpan>> _totalTimePlayedChanged = new();
private readonly byte[] _nspIcon; private readonly byte[] _nspIcon;
private readonly byte[] _xciIcon; private readonly byte[] _xciIcon;
private readonly byte[] _ncaIcon; private readonly byte[] _ncaIcon;
@ -825,6 +845,22 @@ namespace Ryujinx.Ava.Systems.AppLibrary
} }
} }
public Task RefreshTotalTimePlayedAsync()
{
TotalTimePlayed = Gommon.Optional<TimeSpan>.None;
TimeSpan temporary = TimeSpan.Zero;
foreach (var installedApplication in Applications.Items)
{
temporary += LoadAndSaveMetaData(installedApplication.IdString).TimePlayed;
}
TotalTimePlayed = temporary;
return Task.CompletedTask;
}
public async Task RefreshLdn() public async Task RefreshLdn()
{ {
if (ConfigurationState.Instance.Multiplayer.Mode == MultiplayerMode.LdnRyu) if (ConfigurationState.Instance.Multiplayer.Mode == MultiplayerMode.LdnRyu)

View file

@ -24,8 +24,6 @@ namespace Ryujinx.Ava.UI.ViewModels
Version = RyujinxApp.FullAppName + "\n" + Program.Version; Version = RyujinxApp.FullAppName + "\n" + Program.Version;
UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value); UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value);
GitLabLogo = LoadBitmap("resm:Ryujinx.Assets.UIImages.Logo_GitLab.png?assembly=Ryujinx");
RyujinxApp.ThemeChanged += Ryujinx_ThemeChanged; RyujinxApp.ThemeChanged += Ryujinx_ThemeChanged;
} }
@ -43,6 +41,7 @@ namespace Ryujinx.Ava.UI.ViewModels
string themeName = isDarkTheme ? "Dark" : "Light"; string themeName = isDarkTheme ? "Dark" : "Light";
DiscordLogo = LoadBitmap(LogoPathFormat.Format("Discord", themeName)); DiscordLogo = LoadBitmap(LogoPathFormat.Format("Discord", themeName));
GitLabLogo = LoadBitmap(LogoPathFormat.Format("GitLab", themeName));
} }
private static Bitmap LoadBitmap(string uri) => new(Avalonia.Platform.AssetLoader.Open(new Uri(uri))); private static Bitmap LoadBitmap(string uri) => new(Avalonia.Platform.AssetLoader.Open(new Uri(uri)));

View file

@ -25,6 +25,7 @@ using Ryujinx.Ava.UI.Renderer;
using Ryujinx.Ava.UI.Windows; using Ryujinx.Ava.UI.Windows;
using Ryujinx.Ava.Systems.AppLibrary; using Ryujinx.Ava.Systems.AppLibrary;
using Ryujinx.Ava.Systems.Configuration; using Ryujinx.Ava.Systems.Configuration;
using Ryujinx.Ava.Utilities;
using Ryujinx.Common; using Ryujinx.Common;
using Ryujinx.Common.Configuration; using Ryujinx.Common.Configuration;
using Ryujinx.Common.Helper; using Ryujinx.Common.Helper;
@ -112,6 +113,7 @@ namespace Ryujinx.Ava.UI.ViewModels
await Updater.BeginUpdateAsync(true); await Updater.BeginUpdateAsync(true);
}); });
private bool _showTotalTimePlayed;
private bool _showLoadProgress; private bool _showLoadProgress;
private bool _isGameRunning; private bool _isGameRunning;
private bool _isAmiiboRequested; private bool _isAmiiboRequested;
@ -197,6 +199,8 @@ namespace Ryujinx.Ava.UI.ViewModels
#if DEBUG #if DEBUG
topLevel.AttachDevTools(new KeyGesture(Avalonia.Input.Key.F12, KeyModifiers.Control)); topLevel.AttachDevTools(new KeyGesture(Avalonia.Input.Key.F12, KeyModifiers.Control));
#endif #endif
Window.ApplicationLibrary.TotalTimePlayedRecalculated += TotalTimePlayed_Recalculated;
} }
#region Properties #region Properties
@ -300,6 +304,24 @@ namespace Ryujinx.Ava.UI.ViewModels
} }
} }
private void TotalTimePlayed_Recalculated(Optional<TimeSpan> ts)
{
ShowTotalTimePlayed = ts.HasValue;
if (ts.HasValue)
LocaleManager.Instance.SetDynamicValues(LocaleKeys.GameListLabelTotalTimePlayed, ValueFormatUtils.FormatTimeSpan(ts.Value));
}
public bool ShowTotalTimePlayed
{
get => _showTotalTimePlayed && EnableNonGameRunningControls;
set
{
_showTotalTimePlayed = value;
OnPropertyChanged();
}
}
public ApplicationData ListSelectedApplication public ApplicationData ListSelectedApplication
{ {
get => _listSelectedApplication; get => _listSelectedApplication;

View file

@ -113,6 +113,7 @@
Background="Transparent" Background="Transparent"
Click="Button_OnClick" Click="Button_OnClick"
CornerRadius="15" CornerRadius="15"
Tag="https://src.ryujinx.app"
ToolTip.Tip="{ext:Locale AboutGitLabUrlTooltipMessage}"> ToolTip.Tip="{ext:Locale AboutGitLabUrlTooltipMessage}">
<Image Source="{Binding GitLabLogo}" /> <Image Source="{Binding GitLabLogo}" />
</Button> </Button>

View file

@ -6,7 +6,6 @@ using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Controls; using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels; using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Common;
using Ryujinx.Common.Helper; using Ryujinx.Common.Helper;
using System.Threading.Tasks; using System.Threading.Tasks;
using Button = Avalonia.Controls.Button; using Button = Avalonia.Controls.Button;
@ -18,9 +17,6 @@ namespace Ryujinx.Ava.UI.Views.Dialog
public AboutView() public AboutView()
{ {
InitializeComponent(); InitializeComponent();
GitRepoButton.Tag =
$"https://git.ryujinx.app/{ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelSourceRepo}";
} }
public static async Task Show() public static async Task Show()

View file

@ -29,7 +29,7 @@
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding EnableNonGameRunningControls}"> IsVisible="{Binding EnableNonGameRunningControls}">
<Grid Margin="0" ColumnDefinitions="Auto,Auto,Auto,*"> <Grid Margin="0" ColumnDefinitions="Auto,Auto,Auto,*,Auto,Auto,*">
<Button <Button
Width="25" Width="25"
Height="25" Height="25"
@ -68,6 +68,14 @@
IsVisible="{Binding StatusBarVisible}" IsVisible="{Binding StatusBarVisible}"
Maximum="{Binding StatusBarProgressMaximum}" Maximum="{Binding StatusBarProgressMaximum}"
Value="{Binding StatusBarProgressValue}" /> Value="{Binding StatusBarProgressValue}" />
<controls:MiniVerticalSeparator Grid.Column="4" IsVisible="{Binding ShowTotalTimePlayed}" />
<TextBlock
Grid.Column="5"
Margin="5,0,5,0"
VerticalAlignment="Center"
IsVisible="{Binding ShowTotalTimePlayed}"
Text="{ext:Locale GameListLabelTotalTimePlayed}">
</TextBlock>
</Grid> </Grid>
</StackPanel> </StackPanel>
<StackPanel <StackPanel

View file

@ -718,6 +718,8 @@ namespace Ryujinx.Ava.UI.Windows
ShowNewContentAddedDialog(dlcLoaded, dlcRemoved, updatesLoaded, updatesRemoved); ShowNewContentAddedDialog(dlcLoaded, dlcRemoved, updatesLoaded, updatesRemoved);
} }
Executor.ExecuteBackgroundAsync(ApplicationLibrary.RefreshTotalTimePlayedAsync);
_isLoading = false; _isLoading = false;
}) })
{ {