mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-16 00:29:09 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user