Save Common implementation (#434)

* save common implementation

* remove zero userid check

* Renamed UserId to UInt128

* fix index in hex conversion
This commit is contained in:
emmauss 2018-10-07 16:13:46 +03:00 committed by Thomas Guillemard
parent 5b8ccb717f
commit caa181edf2
9 changed files with 97 additions and 108 deletions

View file

@ -1,5 +1,6 @@
using Ryujinx.HLE.HOS;
using System.IO;
using System.Linq;
using static Ryujinx.HLE.FileSystem.VirtualFileSystem;
@ -35,9 +36,11 @@ namespace Ryujinx.HLE.FileSystem
}
}
string SaveAccount = SaveMetaData.UserId.IsZero() ? "savecommon" : SaveMetaData.UserId.ToString();
string SavePath = Path.Combine(BaseSavePath,
SaveMetaData.SaveId.ToString("x16"),
SaveMetaData.UserId.ToString(),
SaveAccount,
SaveMetaData.SaveDataType == SaveDataType.SaveData ? CurrentTitleId.ToString("x16") : string.Empty);
return SavePath;