mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
I hate programming and will furiously smash my monitor if I ever see another oversight of this caliber ever again in my goddamn life
This commit is contained in:
parent
5799091044
commit
59c8f3fd9d
3 changed files with 4 additions and 6 deletions
|
@ -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->MTypeProtect(std::bit_cast<VAddr>(addr), size, protection_flags);
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceKernelDirectMemoryQuery(u64 offset, int flags, OrbisQueryInfo* query_info,
|
||||
|
|
|
@ -348,7 +348,7 @@ int MemoryManager::Protect(VAddr addr, size_t size, MemoryProt prot) {
|
|||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
int MemoryManager::MTypeProtect(VAddr addr, size_t size, VMAType mtype, MemoryProt prot) {
|
||||
int MemoryManager::MTypeProtect(VAddr addr, size_t size, MemoryProt prot) {
|
||||
std::scoped_lock lk{mutex};
|
||||
|
||||
// Find the virtual memory area that contains the specified address range.
|
||||
|
@ -377,8 +377,7 @@ int MemoryManager::MTypeProtect(VAddr addr, size_t size, VMAType mtype, MemoryPr
|
|||
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
|
||||
// Change type and protection
|
||||
vma.type = mtype;
|
||||
// Change protection
|
||||
vma.prot = prot;
|
||||
|
||||
// Set permissions
|
||||
|
|
|
@ -166,7 +166,7 @@ public:
|
|||
|
||||
int Protect(VAddr addr, size_t size, MemoryProt prot);
|
||||
|
||||
int MTypeProtect(VAddr addr, size_t size, VMAType mtype, MemoryProt prot);
|
||||
int MTypeProtect(VAddr addr, size_t size, MemoryProt prot);
|
||||
|
||||
int VirtualQuery(VAddr addr, int flags, ::Libraries::Kernel::OrbisVirtualQueryInfo* info);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue