From 6a94538b6df751400143eb6459688f525fd71ea6 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Tue, 14 Apr 2020 17:10:27 -0700 Subject: [PATCH] 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 --- Ryujinx.HLE/HOS/Horizon.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index 30c8098e9b..f6021ec780 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -254,6 +254,11 @@ namespace Ryujinx.HLE.HOS LocalFileSystem codeFs = new LocalFileSystem(exeFsDir); LoadExeFs(codeFs, out _); + + if (TitleId != 0) + { + EnsureSaveData(new TitleId(TitleId)); + } } public void LoadXci(string xciFile) @@ -755,14 +760,14 @@ namespace Ryujinx.HLE.HOS 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()) { 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()) {