feat: add fallback to Classic Ryugay for app icon

This commit is contained in:
VewDev
2025-08-29 20:40:46 +02:00
parent af0f8e2720
commit 8ee675cd62

View File

@@ -185,7 +185,18 @@ namespace Ryujinx.Ava
public static void UpdateAppIcon(string newIconName)
{
ApplicationIcon selectedIcon = AvailableApplicationIcons.First(x => x.Name == newIconName);
if (newIconName.IsNullOrEmpty())
{
newIconName = "Classic Ryugay";
}
ApplicationIcon selectedIcon = AvailableApplicationIcons.FirstOrDefault(x => x.Name == newIconName);
if (selectedIcon == null)
{
// Fallback to default icon if the selected one is not found
UpdateAppIcon("Classic Ryugay");
}
Stream activeIconStream = EmbeddedResources.GetStream(selectedIcon.FullPath);
if (activeIconStream != null)
{