Add support for cache storage (#936)

* Update LibHac

* Run EnsureApplicationCacheStorage when launching a game

* Add new FS commands
This commit is contained in:
Alex Barney 2020-03-03 07:07:06 -07:00 committed by GitHub
parent dc97457bf0
commit cecbd256a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 10 deletions

View file

@ -519,7 +519,7 @@ namespace Ryujinx.HLE.HOS
{
Result result = codeFs.OpenFile(out IFile npdmFile, "/main.npdm", OpenMode.Read);
if (result == ResultFs.PathNotFound)
if (ResultFs.PathNotFound.Includes(result))
{
Logger.PrintWarning(LogClass.Loader, "NPDM file not found, using default values!");
@ -691,7 +691,16 @@ namespace Ryujinx.HLE.HOS
"No control file was found for this game. Using a dummy one instead. This may cause inaccuracies in some games.");
}
Result rc = EnsureApplicationSaveData(Device.FileSystem.FsClient, out _, titleId, ref control, ref user);
FileSystemClient fs = Device.FileSystem.FsClient;
Result rc = fs.EnsureApplicationCacheStorage(out _, titleId, ref ControlData.Value);
if (rc.IsFailure())
{
Logger.PrintError(LogClass.Application, $"Error calling EnsureApplicationCacheStorage. Result code {rc.ToStringWithName()}");
}
rc = EnsureApplicationSaveData(fs, out _, titleId, ref ControlData.Value, ref user);
if (rc.IsFailure())
{