From f6328ebb69c66725358895c655e9ebaa1a672498 Mon Sep 17 00:00:00 2001 From: Shyanne Date: Sat, 27 Dec 2025 23:04:20 -0500 Subject: [PATCH] Amended typos and updated commentary --- src/Ryujinx/Systems/AppHost.cs | 15 +++++++++------ src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs | 6 ++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Ryujinx/Systems/AppHost.cs b/src/Ryujinx/Systems/AppHost.cs index 06a60dc82..4b7ed71ec 100644 --- a/src/Ryujinx/Systems/AppHost.cs +++ b/src/Ryujinx/Systems/AppHost.cs @@ -61,7 +61,7 @@ using VSyncMode = Ryujinx.Common.Configuration.VSyncMode; namespace Ryujinx.Ava.Systems { - internal class AppHost : IDisposable // notate this + internal class AppHost : IDisposable { private const int CursorHideIdleTime = 5; // Hide Cursor seconds. private const float MaxResolutionScale = 4.0f; // Max resolution hotkeys can scale to before wrapping. @@ -437,7 +437,7 @@ namespace Ryujinx.Ava.Systems SaveBitmapAsPng(bitmapToSave, path); - Logger.Notice.Print(LogClass.Application, $"Screenshot saved to {path}.", "Screenshot"); + Logger.Notice.Print(LogClass.Application, $"Screenshot saved to '{path}'.", "Screenshot"); } }); } @@ -611,9 +611,9 @@ namespace Ryujinx.Ava.Systems _isActive = false; // NOTE: The render loop is allowed to stay alive until the renderer itself is disposed, as it may handle resource dispose. - // We only need to wait for all commands submitted during the main gpu loop to be processed. + // We only need to wait for all commands submitted during the main gpu loop to be processed, unless the GPU event is cancelled. - WaitHandle.WaitAny(new []{_gpuDoneEvent, _gpuCancellationTokenSource.Token.WaitHandle}); // notate this + WaitHandle.WaitAny(new []{_gpuDoneEvent, _gpuCancellationTokenSource.Token.WaitHandle}); _gpuCancellationTokenSource.Dispose(); _gpuDoneEvent.Dispose(); @@ -627,11 +627,14 @@ namespace Ryujinx.Ava.Systems AppExit?.Invoke(this, EventArgs.Empty); } - public void Dispose() // notate this + // MUST be public to inherit from IDisposable + public void Dispose() { if (Device.Processes != null) { - MainWindowViewModel.UpdateGameMetadata(Device.Processes.ActiveApplication?.ProgramIdText ?? "", // notate this + // If the ActiveApplication is null, then the ProgramIdText should be + // so that we aren't arbitrarily applying metadata to something that doesn't exist. + MainWindowViewModel.UpdateGameMetadata(Device.Processes.ActiveApplication?.ProgramIdText ?? "", _playTimer.Elapsed); } diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 46c641fac..c537b7ad8 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -1741,7 +1741,6 @@ namespace Ryujinx.Ava.UI.ViewModels application.Name ??= AppHost.Device.Processes.ActiveApplication.Name; - // notate this SelectedIcon ??= ApplicationLibrary.GetApplicationIcon(application.Path, ConfigurationState.Instance.System.Language, application.Id); @@ -1768,9 +1767,8 @@ namespace Ryujinx.Ava.UI.ViewModels }); public static void UpdateGameMetadata(string titleId, TimeSpan playTime) - =>ApplicationLibrary.LoadAndSaveMetaData(titleId, appMetadata => appMetadata.UpdatePostGame(playTime)); - - + => ApplicationLibrary.LoadAndSaveMetaData(titleId, appMetadata => appMetadata.UpdatePostGame(playTime)); + public void RefreshFirmwareStatus() { SystemVersion version = null;