feat: add fallback to Classic Ryugay for app icon

merge-requests/128/head
VewDev 2025-08-29 20:40:46 +02:00
parent af0f8e2720
commit 8ee675cd62
1 changed files with 12 additions and 1 deletions

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)
{