Ensure account save data exists when launching an extracted game (#1108)

Also fix a regression from cecbd256 where the dummy control data wouldn't be used
This commit is contained in:
Alex Barney 2020-04-14 17:10:27 -07:00 committed by GitHub
parent 92cc37e365
commit 6a94538b6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -254,6 +254,11 @@ namespace Ryujinx.HLE.HOS
LocalFileSystem codeFs = new LocalFileSystem(exeFsDir); LocalFileSystem codeFs = new LocalFileSystem(exeFsDir);
LoadExeFs(codeFs, out _); LoadExeFs(codeFs, out _);
if (TitleId != 0)
{
EnsureSaveData(new TitleId(TitleId));
}
} }
public void LoadXci(string xciFile) public void LoadXci(string xciFile)
@ -755,14 +760,14 @@ namespace Ryujinx.HLE.HOS
FileSystemClient fs = Device.FileSystem.FsClient; FileSystemClient fs = Device.FileSystem.FsClient;
Result rc = fs.EnsureApplicationCacheStorage(out _, titleId, ref ControlData.Value); Result rc = fs.EnsureApplicationCacheStorage(out _, titleId, ref control);
if (rc.IsFailure()) if (rc.IsFailure())
{ {
Logger.PrintError(LogClass.Application, $"Error calling EnsureApplicationCacheStorage. Result code {rc.ToStringWithName()}"); Logger.PrintError(LogClass.Application, $"Error calling EnsureApplicationCacheStorage. Result code {rc.ToStringWithName()}");
} }
rc = EnsureApplicationSaveData(fs, out _, titleId, ref ControlData.Value, ref user); rc = EnsureApplicationSaveData(fs, out _, titleId, ref control, ref user);
if (rc.IsFailure()) if (rc.IsFailure())
{ {