Save fixes (#1031)

* Add ElfInfo to track current game info in a singleton

* SaveData compatibility with old firmwares

* sceKernelOpen: fix for write-only mode

* imgui: add font to render non-ascii characters

* save_data: fix Backup Job including old backup in the new backup

* Save backup: fix to avoid filling the queue

 Also limiting 1 backup / 10sec

* Save backup: fix search not handling empty pattern

*backup time improv
This commit is contained in:
Vinicius Rangel
2024-09-23 08:50:49 -03:00
committed by GitHub
parent a5001d11a8
commit 10d29cc007
17 changed files with 421 additions and 105 deletions

View File

@@ -89,6 +89,8 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) {
}
// RW, then scekernelWrite is called and savedata is written just fine now.
e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::ReadWrite);
} else if (write) {
e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Write);
} else {
UNREACHABLE();
}

View File

@@ -8,6 +8,7 @@
#include "common/assert.h"
#include "common/debug.h"
#include "common/elf_info.h"
#include "common/logging/log.h"
#include "common/polyfill_thread.h"
#include "common/singleton.h"
@@ -243,8 +244,7 @@ int PS4_SYSV_ABI sceKernelConvertUtcToLocaltime(time_t time, time_t* local_time,
}
int PS4_SYSV_ABI sceKernelGetCompiledSdkVersion(int* ver) {
auto* param_sfo = Common::Singleton<PSF>::Instance();
int version = param_sfo->GetInteger("SYSTEM_VER").value_or(0x4700000);
int version = Common::ElfInfo::Instance().RawFirmwareVer();
LOG_INFO(Kernel, "returned system version = {:#x}", version);
*ver = version;
return (version > 0) ? ORBIS_OK : ORBIS_KERNEL_ERROR_EINVAL;