android - move title updates support to SAF

This commit is contained in:
Emmanuel Hansen 2023-12-30 12:23:07 +00:00
parent 7955b4f287
commit f403484276
10 changed files with 165 additions and 128 deletions

View file

@ -77,14 +77,14 @@ namespace LibRyujinx
return SwitchDevice?.ContentManager?.VerifyFirmwarePackage(stream, isXci) ?? null;
}
public static bool LoadApplication(Stream stream, FileType type)
public static bool LoadApplication(Stream stream, FileType type, Stream? updateStream = null)
{
var emulationContext = SwitchDevice.EmulationContext;
return type switch
{
FileType.None => false,
FileType.Nsp => emulationContext?.LoadNsp(stream) ?? false,
FileType.Xci => emulationContext?.LoadXci(stream) ?? false,
FileType.Nsp => emulationContext?.LoadNsp(stream, updateStream) ?? false,
FileType.Xci => emulationContext?.LoadXci(stream, updateStream) ?? false,
FileType.Nro => emulationContext?.LoadProgram(stream, true, "") ?? false,
};
}