mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 03:16:23 +02:00
Add game update manager
This commit is contained in:
parent
f95281899c
commit
0e80bd3d51
7 changed files with 227 additions and 36 deletions
|
@ -148,15 +148,29 @@ namespace Ryujinx.Headless.SDL2
|
|||
var updatePath = Marshal.PtrToStringAnsi(updatePathPtr);
|
||||
string _updateJsonPath = System.IO.Path.Combine(AppDataManager.GamesDirPath, titleId, "updates.json");
|
||||
|
||||
TitleUpdateMetadata _titleUpdateWindowData = new TitleUpdateMetadata
|
||||
{
|
||||
TitleUpdateMetadata _titleUpdateWindowData;
|
||||
|
||||
if (File.Exists(_updateJsonPath)) {
|
||||
_titleUpdateWindowData = JsonHelper.DeserializeFromFile<TitleUpdateMetadata>(_updateJsonPath, _titleSerializerContext.TitleUpdateMetadata);
|
||||
|
||||
_titleUpdateWindowData.Paths ??= new List<string>();
|
||||
if (!_titleUpdateWindowData.Paths.Contains(updatePath)) {
|
||||
_titleUpdateWindowData.Paths.Add(updatePath);
|
||||
}
|
||||
|
||||
_titleUpdateWindowData.Selected = updatePath;
|
||||
} else {
|
||||
_titleUpdateWindowData = new TitleUpdateMetadata {
|
||||
Selected = updatePath,
|
||||
Paths = new List<string>(),
|
||||
Paths = new List<string> { updatePath },
|
||||
};
|
||||
}
|
||||
|
||||
JsonHelper.SerializeToFile(_updateJsonPath, _titleUpdateWindowData, _titleSerializerContext.TitleUpdateMetadata);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[UnmanagedCallersOnly(EntryPoint = "get_current_fps")]
|
||||
public static unsafe int GetFPS()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue