mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 12:26:18 +00:00
Emulate memory behavior of libSceGnmDriver initialization (#2807)
* Emulate memory behavior of libSceGnmDriver _DT_INIT Due to the unique way some games check for sceKernelAllocateDirectMemory failures, emulating this properly is necessary. * Clang * Fix address input for direct memory call * Fix bug with DirectQueryAvailable Missed this in my prior PR. * DirectQueryAvailable fix Fixes error cases to be more hardware accurate.
This commit is contained in:
parent
23c616c647
commit
0feb2e7211
4 changed files with 16 additions and 10 deletions
|
@ -106,12 +106,6 @@ s32 PS4_SYSV_ABI sceKernelAvailableDirectMemorySize(u64 searchStart, u64 searchE
|
|||
if (physAddrOut == nullptr || sizeOut == nullptr) {
|
||||
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
if (searchEnd > sceKernelGetDirectMemorySize()) {
|
||||
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
if (searchEnd <= searchStart) {
|
||||
return ORBIS_KERNEL_ERROR_ENOMEM;
|
||||
}
|
||||
|
||||
auto* memory = Core::Memory::Instance();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue