mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-10 18:50:03 +01:00
rpcsx-os: fix sdk version fetching
This commit is contained in:
parent
b2e180e533
commit
84d2add72d
|
|
@ -69,7 +69,7 @@ struct Process final {
|
|||
EventEmitter event;
|
||||
std::optional<sint> exitStatus;
|
||||
|
||||
std::uint32_t sdkVersion = -1;
|
||||
std::uint32_t sdkVersion = 0;
|
||||
std::uint64_t nextTlsSlot = 1;
|
||||
std::uint64_t lastTlsOffset = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -206,8 +206,13 @@ SysResult kern_sysctl(Thread *thread, ptr<sint> name, uint namelen,
|
|||
return ErrorCode::INVAL;
|
||||
}
|
||||
|
||||
ORBIS_RET_ON_ERROR(uwrite(ptr<uint32_t>(old), process->sdkVersion));
|
||||
ORBIS_LOG_ERROR("get sdk version by pid", name[3], process->sdkVersion);
|
||||
auto sdkVersion = process->sdkVersion;
|
||||
if (sdkVersion == 0) {
|
||||
sdkVersion = g_context.fwSdkVersion;
|
||||
}
|
||||
|
||||
ORBIS_RET_ON_ERROR(uwrite(ptr<uint32_t>(old), sdkVersion));
|
||||
ORBIS_LOG_ERROR("get sdk version by pid", name[3], sdkVersion);
|
||||
return uwrite(oldlenp, sizeof(uint32_t));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ ExecEnv ps4CreateExecEnv(orbis::Thread *mainThread,
|
|||
std::uint64_t entryPoint = executableModule->entryPoint;
|
||||
|
||||
if (mainThread->tproc->processParam != nullptr &&
|
||||
mainThread->tproc->processParamSize <= sizeof(Ps4ProcessParam)) {
|
||||
mainThread->tproc->processParamSize >= sizeof(Ps4ProcessParam)) {
|
||||
auto processParam =
|
||||
reinterpret_cast<std::byte *>(mainThread->tproc->processParam);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue