add overload for loading game info from path

This commit is contained in:
Emmanuel Hansen 2023-07-04 11:55:19 +00:00
parent 9c510fec3e
commit 28eb812018
3 changed files with 33 additions and 13 deletions

View file

@ -83,7 +83,7 @@ namespace LibRyujinx
Logger.SetEnable(LogLevel.AccessLog, false);
Logger.AddTarget(new AsyncLogTargetWrapper(
new FileLogTarget(ReleaseInformation.GetBaseApplicationDirectory(), "file"),
new FileLogTarget(basePath, "file"),
1000,
AsyncLogTargetOverflowAction.Block
));
@ -115,6 +115,14 @@ namespace LibRyujinx
};
}
public static GameInfo GetGameInfo(string file)
{
using var stream = File.Open(file, FileMode.Open);
return GetGameInfo(stream, file.ToLower().EndsWith("xci"));
}
public static GameInfo GetGameInfo(Stream gameStream, bool isXci)
{
var gameInfo = new GameInfo();
@ -530,7 +538,7 @@ namespace LibRyujinx
UserChannelPersistence = new UserChannelPersistence();
}
public bool InitializeContext(bool isHostMapped)
public bool InitializeContext(bool isHostMapped, bool useNce)
{
if(LibRyujinx.Renderer == null)
{