mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-19 11:45:47 +00:00
feat: add fallback to Classic Ryugay for app icon
This commit is contained in:
@@ -185,7 +185,18 @@ namespace Ryujinx.Ava
|
|||||||
|
|
||||||
public static void UpdateAppIcon(string newIconName)
|
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);
|
Stream activeIconStream = EmbeddedResources.GetStream(selectedIcon.FullPath);
|
||||||
if (activeIconStream != null)
|
if (activeIconStream != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user