Amended typos and updated commentary

This commit is contained in:
Shyanne 2025-12-27 23:04:20 -05:00
parent 8bd290cc57
commit cf72e189b7
2 changed files with 11 additions and 10 deletions

View file

@ -61,7 +61,7 @@ using VSyncMode = Ryujinx.Common.Configuration.VSyncMode;
namespace Ryujinx.Ava.Systems namespace Ryujinx.Ava.Systems
{ {
internal class AppHost : IDisposable // notate this internal class AppHost : IDisposable
{ {
private const int CursorHideIdleTime = 5; // Hide Cursor seconds. private const int CursorHideIdleTime = 5; // Hide Cursor seconds.
private const float MaxResolutionScale = 4.0f; // Max resolution hotkeys can scale to before wrapping. 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); 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; _isActive = false;
// NOTE: The render loop is allowed to stay alive until the renderer itself is disposed, as it may handle resource dispose. // 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(); _gpuCancellationTokenSource.Dispose();
_gpuDoneEvent.Dispose(); _gpuDoneEvent.Dispose();
@ -627,11 +627,14 @@ namespace Ryujinx.Ava.Systems
AppExit?.Invoke(this, EventArgs.Empty); AppExit?.Invoke(this, EventArgs.Empty);
} }
public void Dispose() // notate this // MUST be public to inherit from IDisposable
public void Dispose()
{ {
if (Device.Processes != null) if (Device.Processes != null)
{ {
MainWindowViewModel.UpdateGameMetadata(Device.Processes.ActiveApplication?.ProgramIdText ?? "<INVALID>", // notate this // If the ActiveApplication is null, then the ProgramIdText should be <INVALID>
// so that we aren't arbitrarily applying metadata to something that doesn't exist.
MainWindowViewModel.UpdateGameMetadata(Device.Processes.ActiveApplication?.ProgramIdText ?? "<INVALID>",
_playTimer.Elapsed); _playTimer.Elapsed);
} }

View file

@ -1738,7 +1738,6 @@ namespace Ryujinx.Ava.UI.ViewModels
application.Name ??= AppHost.Device.Processes.ActiveApplication.Name; application.Name ??= AppHost.Device.Processes.ActiveApplication.Name;
// notate this
SelectedIcon ??= ApplicationLibrary.GetApplicationIcon(application.Path, SelectedIcon ??= ApplicationLibrary.GetApplicationIcon(application.Path,
ConfigurationState.Instance.System.Language, application.Id); ConfigurationState.Instance.System.Language, application.Id);
@ -1765,9 +1764,8 @@ namespace Ryujinx.Ava.UI.ViewModels
}); });
public static void UpdateGameMetadata(string titleId, TimeSpan playTime) 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() public void RefreshFirmwareStatus()
{ {
SystemVersion version = null; SystemVersion version = null;