mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-24 15:37:10 +02:00
android - add support for nro
This commit is contained in:
parent
9680ecd820
commit
521403b0ea
9 changed files with 219 additions and 124 deletions
|
@ -1,4 +1,4 @@
|
|||
using ARMeilleure.Translation;
|
||||
using ARMeilleure.Translation;
|
||||
using LibHac.Ncm;
|
||||
using LibHac.Tools.FsSystem.NcaUtils;
|
||||
using Ryujinx.Common.Logging;
|
||||
|
@ -66,10 +66,16 @@ namespace LibRyujinx
|
|||
return LoadApplication(path);
|
||||
}
|
||||
|
||||
public static bool LoadApplication(Stream stream, bool isXci)
|
||||
public static bool LoadApplication(Stream stream, FileType type)
|
||||
{
|
||||
var emulationContext = SwitchDevice.EmulationContext;
|
||||
return (isXci ? emulationContext?.LoadXci(stream) : emulationContext.LoadNsp(stream)) ?? false;
|
||||
return type switch
|
||||
{
|
||||
FileType.None => false,
|
||||
FileType.Nsp => emulationContext?.LoadNsp(stream) ?? false,
|
||||
FileType.Xci => emulationContext?.LoadXci(stream) ?? false,
|
||||
FileType.Nro => emulationContext?.LoadProgram(stream, true, "") ?? false,
|
||||
};
|
||||
}
|
||||
|
||||
public static bool LaunchMiiEditApplet()
|
||||
|
@ -221,5 +227,13 @@ namespace LibRyujinx
|
|||
Renderer = null;
|
||||
}
|
||||
}
|
||||
|
||||
public enum FileType
|
||||
{
|
||||
None,
|
||||
Nsp,
|
||||
Xci,
|
||||
Nro
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue