mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 11:35:45 +00:00
Fix VirtualQuery
Found this issue while looking at code from fpPS4. VirtualQuery was setting is_commited to true when the queried region was reserved. Also sets the protection value in the VirtualQueryInfo, as I'd assume not storing that could cause issues in games. This fixes all games currently hanging on the sceKernelmprotect stub.
This commit is contained in:
parent
63d78aee0a
commit
f3a62891ed
1 changed files with 2 additions and 1 deletions
|
@ -305,9 +305,10 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags,
|
|||
const auto& vma = it->second;
|
||||
info->start = vma.base;
|
||||
info->end = vma.base + vma.size;
|
||||
info->protection = static_cast<s32>(vma.prot);
|
||||
info->is_flexible.Assign(vma.type == VMAType::Flexible);
|
||||
info->is_direct.Assign(vma.type == VMAType::Direct);
|
||||
info->is_commited.Assign(vma.type != VMAType::Free);
|
||||
info->is_commited.Assign(vma.type != VMAType::Free && vma.type != VMAType::Reserved);
|
||||
vma.name.copy(info->name.data(), std::min(info->name.size(), vma.name.size()));
|
||||
if (vma.type == VMAType::Direct) {
|
||||
const auto dmem_it = FindDmemArea(vma.phys_base);
|
||||
|
|
Loading…
Add table
Reference in a new issue