mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-23 05:24:56 +03:00
misc: chore: Improve autoloading DLC/updates logging, deliberately switch to Vulkan if Metal was somehow chosen on a non-mac system, add logger lines in the updater, cleanup enabled logs printing
This commit is contained in:
parent
182db31343
commit
789d6ab959
@ -14,6 +14,7 @@ namespace Ryujinx.Common
|
||||
{
|
||||
switch (currentBackend)
|
||||
{
|
||||
case GraphicsBackend.Metal when !OperatingSystem.IsMacOS():
|
||||
case GraphicsBackend.OpenGl when OperatingSystem.IsMacOS():
|
||||
return GraphicsBackend.Vulkan;
|
||||
case GraphicsBackend.Vulkan or GraphicsBackend.OpenGl or GraphicsBackend.Metal:
|
||||
|
@ -674,7 +674,7 @@ namespace Ryujinx.Ava
|
||||
|
||||
public async Task<bool> LoadGuestApplication(BlitStruct<ApplicationControlProperty>? customNacpData = null)
|
||||
{
|
||||
InitializeSwitchInstance();
|
||||
InitEmulatedSwitch();
|
||||
MainWindow.UpdateGraphicsConfig();
|
||||
|
||||
SystemVersion firmwareVersion = ContentManager.GetCurrentFirmwareVersion();
|
||||
@ -757,6 +757,8 @@ namespace Ryujinx.Ava
|
||||
{
|
||||
romFsFiles = Directory.GetFiles(ApplicationPath, "*.romfs");
|
||||
}
|
||||
|
||||
Logger.Notice.Print(LogClass.Application, $"Loading unpacked content archive from '{ApplicationPath}'.");
|
||||
|
||||
if (romFsFiles.Length > 0)
|
||||
{
|
||||
@ -783,6 +785,8 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
else if (File.Exists(ApplicationPath))
|
||||
{
|
||||
Logger.Notice.Print(LogClass.Application, $"Loading content archive from '{ApplicationPath}'.");
|
||||
|
||||
switch (Path.GetExtension(ApplicationPath).ToLowerInvariant())
|
||||
{
|
||||
case ".xci":
|
||||
@ -885,7 +889,7 @@ namespace Ryujinx.Ava
|
||||
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
|
||||
}
|
||||
|
||||
private void InitializeSwitchInstance()
|
||||
private void InitEmulatedSwitch()
|
||||
{
|
||||
// Initialize KeySet.
|
||||
VirtualFileSystem.ReloadKeySet();
|
||||
|
@ -233,11 +233,13 @@ namespace Ryujinx.Ava
|
||||
Logger.Notice.Print(LogClass.Application, $".NET Runtime: {RuntimeInformation.FrameworkDescription}");
|
||||
SystemInfo.Gather().Print();
|
||||
|
||||
var enabledLogLevels = Logger.GetEnabledLevels().ToArray();
|
||||
|
||||
Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {(enabledLogLevels.Length is 0
|
||||
? "<None>"
|
||||
: enabledLogLevels.JoinToString(", "))}");
|
||||
Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {
|
||||
Logger.GetEnabledLevels()
|
||||
.FormatCollection(
|
||||
x => x.ToString(),
|
||||
separator: ", ",
|
||||
emptyCollectionFallback: "<None>")
|
||||
}");
|
||||
|
||||
Logger.Notice.Print(LogClass.Application,
|
||||
AppDataManager.Mode == AppDataManager.LaunchMode.Custom
|
||||
|
@ -691,6 +691,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
ApplicationLibrary.LoadApplications(ConfigurationState.Instance.UI.GameDirs);
|
||||
|
||||
var autoloadDirs = ConfigurationState.Instance.UI.AutoloadDirs.Value;
|
||||
autoloadDirs.ForEach(dir => Logger.Info?.Print(LogClass.Application, $"Auto loading DLC & updates from: {dir}"));
|
||||
if (autoloadDirs.Count > 0)
|
||||
{
|
||||
var updatesLoaded = ApplicationLibrary.AutoLoadTitleUpdates(autoloadDirs, out int updatesRemoved);
|
||||
|
@ -87,6 +87,8 @@ namespace Ryujinx.Ava
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, "Checking for updates.");
|
||||
|
||||
// Get latest version number from GitHub API
|
||||
try
|
||||
@ -140,6 +142,8 @@ namespace Ryujinx.Ava
|
||||
OpenHelper.OpenUrl(ReleaseInformation.GetChangelogForVersion(currentVersion));
|
||||
}
|
||||
}
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, "Up to date.");
|
||||
|
||||
_running = false;
|
||||
|
||||
@ -214,6 +218,8 @@ namespace Ryujinx.Ava
|
||||
? $"Canary {currentVersion} -> Canary {newVersion}"
|
||||
: $"{currentVersion} -> {newVersion}";
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, $"Version found: {newVersionString}");
|
||||
|
||||
RequestUserToUpdate:
|
||||
// Show a message asking the user if they want to update
|
||||
UserResult shouldUpdate = await ContentDialogHelper.CreateUpdaterChoiceDialog(
|
||||
|
@ -840,7 +840,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
||||
try
|
||||
{
|
||||
// Remove any downloadable content which can no longer be located on disk
|
||||
Logger.Notice.Print(LogClass.Application, $"Removing non-existing Title DLCs");
|
||||
var dlcToRemove = _downloadableContents.Items
|
||||
.Where(dlc => !File.Exists(dlc.Dlc.ContainerPath))
|
||||
.ToList();
|
||||
@ -852,8 +851,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
||||
|
||||
foreach (string appDir in appDirs)
|
||||
{
|
||||
Logger.Notice.Print(LogClass.Application, $"Auto loading DLC from: {appDir}");
|
||||
|
||||
if (_cancellationToken.Token.IsCancellationRequested)
|
||||
{
|
||||
return newDlcLoaded;
|
||||
@ -956,7 +953,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
||||
var titleIdsToRefresh = new HashSet<ulong>();
|
||||
|
||||
// Remove any updates which can no longer be located on disk
|
||||
Logger.Notice.Print(LogClass.Application, $"Removing non-existing Title Updates");
|
||||
var updatesToRemove = _titleUpdates.Items
|
||||
.Where(it => !File.Exists(it.TitleUpdate.Path))
|
||||
.ToList();
|
||||
@ -971,8 +967,6 @@ namespace Ryujinx.Ava.Utilities.AppLibrary
|
||||
|
||||
foreach (string appDir in appDirs)
|
||||
{
|
||||
Logger.Notice.Print(LogClass.Application, $"Auto loading updates from: {appDir}");
|
||||
|
||||
if (_cancellationToken.Token.IsCancellationRequested)
|
||||
{
|
||||
return numUpdatesLoaded;
|
||||
|
Loading…
Reference in New Issue
Block a user