core/memory: Fix sceKernelMTypeProtect setting VMA type (#1037)

* I hate programming and will furiously smash my monitor if I ever see another oversight of this caliber ever again in my goddamn life

* Merge both protect functions together
This commit is contained in:
Daniel R. 2024-09-23 18:49:57 +02:00 committed by GitHub
parent 5799091044
commit 8c8a6ccddd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 61 deletions

View file

@ -228,8 +228,7 @@ int PS4_SYSV_ABI sceKernelMProtect(const void* addr, size_t size, int prot) {
int PS4_SYSV_ABI sceKernelMTypeProtect(const void* addr, size_t size, int mtype, int prot) {
Core::MemoryManager* memory_manager = Core::Memory::Instance();
Core::MemoryProt protection_flags = static_cast<Core::MemoryProt>(prot);
return memory_manager->MTypeProtect(std::bit_cast<VAddr>(addr), size,
static_cast<Core::VMAType>(mtype), protection_flags);
return memory_manager->Protect(std::bit_cast<VAddr>(addr), size, protection_flags);
}
int PS4_SYSV_ABI sceKernelDirectMemoryQuery(u64 offset, int flags, OrbisQueryInfo* query_info,