content & viewmodel object creation helper with out param, touch up firmware install step

This commit is contained in:
GreemDev
2025-11-22 18:35:37 -06:00
parent 325e13a490
commit 9b0fa3bf6d
3 changed files with 40 additions and 12 deletions

View File

@@ -1758,11 +1758,19 @@ namespace Ryujinx.Ava.UI.ViewModels
public static void UpdateGameMetadata(string titleId, TimeSpan playTime)
=> ApplicationLibrary.LoadAndSaveMetaData(titleId, appMetadata => appMetadata.UpdatePostGame(playTime));
public void RefreshFirmwareStatus(SystemVersion version = null)
/// <remarks>
/// By default, this method will try to retrieve the installed FW version if the version parameter is null.
/// <paramref name="allowNullVersion"/> forces this method to accept null and not re-lookup
/// in the case you want to deliberately cause an update with a missing firmware version;
///
/// i.e., in the setup wizard.
/// </remarks>
public void RefreshFirmwareStatus(SystemVersion version = null, bool allowNullVersion = false)
{
try
{
version ??= ContentManager.GetCurrentFirmwareVersion();
if (!allowNullVersion)
version ??= ContentManager.GetCurrentFirmwareVersion();
}
catch (Exception)
{