diff --git a/assets/locales.json b/assets/locales.json index e76ea9e9f..02f9ea34e 100644 --- a/assets/locales.json +++ b/assets/locales.json @@ -1947,6 +1947,31 @@ "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", "Translations": { @@ -15528,23 +15553,23 @@ "ar_SA": "", "de_DE": "", "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": "", - "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": "", - "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": "", - "ko_KR": "Ryujinx는 Nintendo Switch™용 에뮬레이터입니다.\n모든 최신 소식을 Discord에서 확인하세요.\n기여에 관심이 있는 개발자는 GitHub 또는 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.", + "ko_KR": "Ryujinx는 Nintendo Switch™ 1용 에뮬레이터입니다.\n모든 최신 소식을 Discord에서 확인하세요.\n기여에 관심이 있는 개발자는 GitLab 또는 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": "", - "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.", - "ru_RU": "Ryujinx - это эмулятор для Nintendo Switch™.\nПолучайте все последние новости разработки в нашем Discord.\nРазработчики, заинтересованные в участии, могут узнать больше на нашем GitHub или 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.", + "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™ 1.\nПолучайте все последние новости разработки в нашем Discord.\nРазработчики, заинтересованные в участии, могут узнать больше на нашем GitLab или 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": "", "tr_TR": "", - "uk_UA": "Ryujinx — це емулятор для Nintendo Switch™.\nОстанні новини можна отримати в нашому Discord.\nРозробники, що бажають долучитись до розробки та зробити свій внесок, можуть отримати більше інформації на нашому GitHub або в Discord.", - "zh_CN": "Ryujinx 是一个 Nintendo Switch™ 模拟器。\n有兴趣做出贡献的开发者可以在我们的 GitHub 或 Discord 上了解更多信息。\n", - "zh_TW": "Ryujinx 是一款 Nintendo Switch™ 模擬器。\n關注我們的 Discord 取得所有最新消息。\n對於有興趣貢獻的開發者,可以在我們的 GitHub 或 Discord 上了解更多資訊。" + "uk_UA": "Ryujinx — це емулятор для Nintendo Switch™ 1.\nОстанні новини можна отримати в нашому Discord.\nРозробники, що бажають долучитись до розробки та зробити свій внесок, можуть отримати більше інформації на нашому GitLab або в Discord.", + "zh_CN": "Ryujinx 是一个 Nintendo Switch™ 1 模拟器。\n有兴趣做出贡献的开发者可以在我们的 GitLab 或 Discord 上了解更多信息。\n", + "zh_TW": "Ryujinx 是一款 Nintendo Switch™ 1 模擬器。\n關注我們的 Discord 取得所有最新消息。\n對於有興趣貢獻的開發者,可以在我們的 GitLab 或 Discord 上了解更多資訊。" } }, { @@ -23300,26 +23325,26 @@ { "ID": "AboutChangelogButton", "Translations": { - "ar_SA": "عرض سجل التغييرات على غيت هاب", - "de_DE": "Changelog in GitHub öffnen", - "el_GR": "Προβολή αρχείου αλλαγών στο GitHub", - "en_US": "View Changelog on GitHub", - "es_ES": "Ver registro de cambios en GitHub", - "fr_FR": "Voir le Changelog sur GitHub", - "he_IL": "צפה במידע אודות שינויים בגיטהב", - "it_IT": "Visualizza changelog su GitHub", - "ja_JP": "GitHub で更新履歴を表示", - "ko_KR": "GitHub에서 변경 내역 보기", - "no_NO": "Vis endringslogg på GitHub", - "pl_PL": "Zobacz listę zmian na GitHubie", - "pt_BR": "Ver Mudanças no GitHub", - "ru_RU": "Показать список изменений на GitHub", - "sv_SE": "Visa ändringslogg på GitHub", - "th_TH": "ดูประวัติการเปลี่ยนแปลงบน GitHub", - "tr_TR": "GitHub'da Değişiklikleri Görüntüle", - "uk_UA": "Переглянути журнал змін на GitHub", - "zh_CN": "在 Github 上查看更新日志", - "zh_TW": "在 GitHub 上檢視更新日誌" + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "View Changelog", + "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": "" } }, { diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs index 0c2f90b7e..d77621db6 100644 --- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs +++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs @@ -331,7 +331,8 @@ namespace Ryujinx.Graphics.Shader.Instructions { context.GetOp(); - 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) diff --git a/src/Ryujinx/Assets/UIImages/Logo_GitLab.png b/src/Ryujinx/Assets/UIImages/Logo_GitLab.png deleted file mode 100644 index 0e5412744..000000000 Binary files a/src/Ryujinx/Assets/UIImages/Logo_GitLab.png and /dev/null differ diff --git a/src/Ryujinx/Assets/UIImages/Logo_GitLab_Dark.png b/src/Ryujinx/Assets/UIImages/Logo_GitLab_Dark.png new file mode 100644 index 000000000..e6fb5ecb5 Binary files /dev/null and b/src/Ryujinx/Assets/UIImages/Logo_GitLab_Dark.png differ diff --git a/src/Ryujinx/Assets/UIImages/Logo_GitLab_Light.png b/src/Ryujinx/Assets/UIImages/Logo_GitLab_Light.png new file mode 100644 index 000000000..17a4feefb Binary files /dev/null and b/src/Ryujinx/Assets/UIImages/Logo_GitLab_Light.png differ diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj index afd09a4d5..6860e2c4e 100644 --- a/src/Ryujinx/Ryujinx.csproj +++ b/src/Ryujinx/Ryujinx.csproj @@ -170,7 +170,8 @@ - + + diff --git a/src/Ryujinx/Systems/AppLibrary/ApplicationLibrary.cs b/src/Ryujinx/Systems/AppLibrary/ApplicationLibrary.cs index 618bc2b66..9ac484768 100644 --- a/src/Ryujinx/Systems/AppLibrary/ApplicationLibrary.cs +++ b/src/Ryujinx/Systems/AppLibrary/ApplicationLibrary.cs @@ -51,6 +51,26 @@ namespace Ryujinx.Ava.Systems.AppLibrary public readonly IObservableCache<(TitleUpdateModel TitleUpdate, bool IsSelected), TitleUpdateModel> TitleUpdates; public readonly IObservableCache<(DownloadableContentModel Dlc, bool IsEnabled), DownloadableContentModel> DownloadableContents; + private Gommon.Optional _totalTimePlayed; + + public Gommon.Optional TotalTimePlayed + { + get => _totalTimePlayed; + private set + { + _totalTimePlayed = value; + _totalTimePlayedChanged.Call(value); + } + } + + public event Action> TotalTimePlayedRecalculated + { + add => _totalTimePlayedChanged.Add(value); + remove => _totalTimePlayedChanged.Remove(value); + } + + private readonly Event> _totalTimePlayedChanged = new(); + private readonly byte[] _nspIcon; private readonly byte[] _xciIcon; private readonly byte[] _ncaIcon; @@ -825,6 +845,22 @@ namespace Ryujinx.Ava.Systems.AppLibrary } } + public Task RefreshTotalTimePlayedAsync() + { + TotalTimePlayed = Gommon.Optional.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() { if (ConfigurationState.Instance.Multiplayer.Mode == MultiplayerMode.LdnRyu) diff --git a/src/Ryujinx/UI/ViewModels/AboutWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/AboutWindowViewModel.cs index 23a82277f..734647690 100644 --- a/src/Ryujinx/UI/ViewModels/AboutWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/AboutWindowViewModel.cs @@ -24,8 +24,6 @@ namespace Ryujinx.Ava.UI.ViewModels Version = RyujinxApp.FullAppName + "\n" + Program.Version; UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value); - GitLabLogo = LoadBitmap("resm:Ryujinx.Assets.UIImages.Logo_GitLab.png?assembly=Ryujinx"); - RyujinxApp.ThemeChanged += Ryujinx_ThemeChanged; } @@ -43,6 +41,7 @@ namespace Ryujinx.Ava.UI.ViewModels string themeName = isDarkTheme ? "Dark" : "Light"; 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))); diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 3f1393b47..c82f40ba4 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -25,6 +25,7 @@ using Ryujinx.Ava.UI.Renderer; using Ryujinx.Ava.UI.Windows; using Ryujinx.Ava.Systems.AppLibrary; using Ryujinx.Ava.Systems.Configuration; +using Ryujinx.Ava.Utilities; using Ryujinx.Common; using Ryujinx.Common.Configuration; using Ryujinx.Common.Helper; @@ -112,6 +113,7 @@ namespace Ryujinx.Ava.UI.ViewModels await Updater.BeginUpdateAsync(true); }); + private bool _showTotalTimePlayed; private bool _showLoadProgress; private bool _isGameRunning; private bool _isAmiiboRequested; @@ -197,6 +199,8 @@ namespace Ryujinx.Ava.UI.ViewModels #if DEBUG topLevel.AttachDevTools(new KeyGesture(Avalonia.Input.Key.F12, KeyModifiers.Control)); #endif + + Window.ApplicationLibrary.TotalTimePlayedRecalculated += TotalTimePlayed_Recalculated; } #region Properties @@ -299,6 +303,24 @@ namespace Ryujinx.Ava.UI.ViewModels OnPropertyChanged(nameof(ShowFirmwareStatus)); } } + + private void TotalTimePlayed_Recalculated(Optional 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 { diff --git a/src/Ryujinx/UI/Views/Dialog/AboutView.axaml b/src/Ryujinx/UI/Views/Dialog/AboutView.axaml index acf2940e5..5788f533f 100644 --- a/src/Ryujinx/UI/Views/Dialog/AboutView.axaml +++ b/src/Ryujinx/UI/Views/Dialog/AboutView.axaml @@ -113,6 +113,7 @@ Background="Transparent" Click="Button_OnClick" CornerRadius="15" + Tag="https://src.ryujinx.app" ToolTip.Tip="{ext:Locale AboutGitLabUrlTooltipMessage}"> diff --git a/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs b/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs index 4e89bfd86..ce86156b9 100644 --- a/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs +++ b/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs @@ -6,7 +6,6 @@ using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.UI.Controls; using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.ViewModels; -using Ryujinx.Common; using Ryujinx.Common.Helper; using System.Threading.Tasks; using Button = Avalonia.Controls.Button; @@ -18,9 +17,6 @@ namespace Ryujinx.Ava.UI.Views.Dialog public AboutView() { InitializeComponent(); - - GitRepoButton.Tag = - $"https://git.ryujinx.app/{ReleaseInformation.ReleaseChannelOwner}/{ReleaseInformation.ReleaseChannelSourceRepo}"; } public static async Task Show() diff --git a/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml b/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml index 02cc1fc7b..296936565 100644 --- a/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml +++ b/src/Ryujinx/UI/Views/Main/MainStatusBarView.axaml @@ -29,7 +29,7 @@ Margin="5" VerticalAlignment="Center" IsVisible="{Binding EnableNonGameRunningControls}"> - +