mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 22:00:04 +00:00
Merge remote-tracking branch 'upstream/master' into feature/savestates-2
This commit is contained in:
commit
03379b2072
17 changed files with 224 additions and 93 deletions
|
@ -46,10 +46,17 @@ static const ResultCode ERROR_NOT_LOADED = // 0xD8A12C0D
|
|||
|
||||
static bool VerifyBufferState(Kernel::Process& process, VAddr buffer_ptr, u32 size) {
|
||||
auto vma = process.vm_manager.FindVMA(buffer_ptr);
|
||||
return vma != process.vm_manager.vma_map.end() &&
|
||||
vma->second.base + vma->second.size >= buffer_ptr + size &&
|
||||
vma->second.permissions == Kernel::VMAPermission::ReadWrite &&
|
||||
vma->second.meminfo_state == Kernel::MemoryState::Private;
|
||||
while (vma != process.vm_manager.vma_map.end()) {
|
||||
if (vma->second.permissions != Kernel::VMAPermission::ReadWrite ||
|
||||
vma->second.meminfo_state != Kernel::MemoryState::Private) {
|
||||
return false;
|
||||
}
|
||||
if (vma->second.base + vma->second.size >= buffer_ptr + size) {
|
||||
return true;
|
||||
}
|
||||
vma = std::next(vma);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void RO::Initialize(Kernel::HLERequestContext& ctx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue