Use MemPerm enum instead of magic numbers in svcMapMemoryBlock calls

This commit is contained in:
fincs 2020-07-02 00:13:55 +02:00
parent 4e387679f7
commit 976d284f3a
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60
3 changed files with 3 additions and 3 deletions

View File

@ -502,7 +502,7 @@ static bool ndspFindAndLoadComponent(void)
{ {
extern u32 fake_heap_end; extern u32 fake_heap_end;
u32 mapAddr = (fake_heap_end+0xFFF) &~ 0xFFF; u32 mapAddr = (fake_heap_end+0xFFF) &~ 0xFFF;
rc = svcMapMemoryBlock(rsrc, mapAddr, 0x3, 0x3); rc = svcMapMemoryBlock(rsrc, mapAddr, MEMPERM_READWRITE, MEMPERM_READWRITE);
if (R_FAILED(rc)) break; if (R_FAILED(rc)) break;
componentSize = *(u32*)(mapAddr + 0x104); componentSize = *(u32*)(mapAddr + 0x104);

View File

@ -207,7 +207,7 @@ Result csndInit(void)
goto cleanup1; goto cleanup1;
} }
ret = svcMapMemoryBlock(csndSharedMemBlock, (u32)csndSharedMem, 3, 0x10000000); ret = svcMapMemoryBlock(csndSharedMemBlock, (u32)csndSharedMem, MEMPERM_READWRITE, MEMPERM_DONTCARE);
if (R_FAILED(ret)) goto cleanup2; if (R_FAILED(ret)) goto cleanup2;
memset((void*)csndSharedMem, 0, csndSharedMemSize); memset((void*)csndSharedMem, 0, csndSharedMemSize);

View File

@ -46,7 +46,7 @@ Result irrstInit(void)
goto cleanup1; goto cleanup1;
} }
if(R_FAILED(ret = svcMapMemoryBlock(irrstMemHandle, (u32)irrstSharedMem, MEMPERM_READ, 0x10000000))) goto cleanup2; if(R_FAILED(ret = svcMapMemoryBlock(irrstMemHandle, (u32)irrstSharedMem, MEMPERM_READ, MEMPERM_DONTCARE))) goto cleanup2;
return 0; return 0;