mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-22 01:43:23 +01:00
parent
bdb92224f9
commit
d7e17abade
1 changed files with 12 additions and 15 deletions
|
@ -12,18 +12,11 @@ namespace Ryujinx.UI.Common.Helper
|
||||||
{
|
{
|
||||||
public static bool IsFirmwareValid(ContentManager contentManager, out UserError error)
|
public static bool IsFirmwareValid(ContentManager contentManager, out UserError error)
|
||||||
{
|
{
|
||||||
bool hasFirmware = contentManager.GetCurrentFirmwareVersion() != null;
|
error = contentManager.GetCurrentFirmwareVersion() != null
|
||||||
|
? UserError.Success
|
||||||
|
: UserError.NoFirmware;
|
||||||
|
|
||||||
if (hasFirmware)
|
return error is UserError.Success;
|
||||||
{
|
|
||||||
error = UserError.Success;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
error = UserError.NoFirmware;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool CanFixStartApplication(ContentManager contentManager, string baseApplicationPath, UserError error, out SystemVersion firmwareVersion)
|
public static bool CanFixStartApplication(ContentManager contentManager, string baseApplicationPath, UserError error, out SystemVersion firmwareVersion)
|
||||||
|
@ -95,14 +88,18 @@ namespace Ryujinx.UI.Common.Helper
|
||||||
string baseApplicationExtension = Path.GetExtension(baseApplicationPath).ToLowerInvariant();
|
string baseApplicationExtension = Path.GetExtension(baseApplicationPath).ToLowerInvariant();
|
||||||
|
|
||||||
// NOTE: We don't force homebrew developers to install a system firmware.
|
// NOTE: We don't force homebrew developers to install a system firmware.
|
||||||
if (baseApplicationExtension is not (".nro" or ".nso"))
|
if (baseApplicationExtension is ".nro" or ".nso")
|
||||||
return IsFirmwareValid(contentManager, out error);
|
{
|
||||||
|
error = UserError.Success;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return IsFirmwareValid(contentManager, out error);
|
||||||
}
|
}
|
||||||
|
|
||||||
error = UserError.ApplicationNotFound;
|
error = UserError.ApplicationNotFound;
|
||||||
|
|
||||||
return error is UserError.Success;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue