mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-06 18:53:16 +00:00
Fix clang formatting, DEBUG_ASSERT, and extra spacing
This commit is contained in:
parent
ed01f2f371
commit
ab87394b25
2 changed files with 6 additions and 9 deletions
|
@ -261,7 +261,7 @@ struct AddressSpace::Impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use assert to ensure success in debug builds
|
// Use assert to ensure success in debug builds
|
||||||
assert(success && "Failed to change virtual memory protection");
|
DEBUG_ASSERT(success && "Failed to change virtual memory protection");
|
||||||
}
|
}
|
||||||
|
|
||||||
HANDLE process{};
|
HANDLE process{};
|
||||||
|
@ -504,11 +504,8 @@ void AddressSpace::Unmap(VAddr virtual_addr, size_t size, VAddr start_in_vma, VA
|
||||||
|
|
||||||
void AddressSpace::Protect(VAddr virtual_addr, size_t size, MemoryPermission perms) {
|
void AddressSpace::Protect(VAddr virtual_addr, size_t size, MemoryPermission perms) {
|
||||||
const bool read = True(perms & MemoryPermission::Read);
|
const bool read = True(perms & MemoryPermission::Read);
|
||||||
|
|
||||||
const bool write = True(perms & MemoryPermission::Write);
|
const bool write = True(perms & MemoryPermission::Write);
|
||||||
|
|
||||||
const bool execute = True(perms & MemoryPermission::Execute);
|
const bool execute = True(perms & MemoryPermission::Execute);
|
||||||
|
|
||||||
return impl->Protect(virtual_addr, size, read, write, execute);
|
return impl->Protect(virtual_addr, size, read, write, execute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -297,7 +297,7 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
|
||||||
|
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
processed++;
|
processed++;
|
||||||
}
|
}
|
||||||
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_PROTECT: {
|
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_PROTECT: {
|
||||||
result = sceKernelMProtect(entries[i].start, entries[i].length, entries[i].protection);
|
result = sceKernelMProtect(entries[i].start, entries[i].length, entries[i].protection);
|
||||||
LOG_INFO(Kernel_Vmm, "BatchMap: entry = {}, operation = {}, len = {:#x}, result = {}",
|
LOG_INFO(Kernel_Vmm, "BatchMap: entry = {}, operation = {}, len = {:#x}, result = {}",
|
||||||
|
@ -310,8 +310,8 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
|
||||||
processed++;
|
processed++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_TYPE_PROTECT: {
|
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_TYPE_PROTECT: {
|
||||||
result = sceKernelMTypeProtect(entries[i].start, entries[i].length, entries[i].type,
|
result = sceKernelMTypeProtect(entries[i].start, entries[i].length, entries[i].type,
|
||||||
entries[i].protection);
|
entries[i].protection);
|
||||||
|
@ -325,8 +325,8 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
|
||||||
processed++;
|
processed++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_FLEXIBLE: {
|
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_FLEXIBLE: {
|
||||||
result = sceKernelMapNamedFlexibleMemory(&entries[i].start, entries[i].length,
|
result = sceKernelMapNamedFlexibleMemory(&entries[i].start, entries[i].length,
|
||||||
entries[i].protection, flags, "");
|
entries[i].protection, flags, "");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue