revert the memory map to the old one (mostly)

This commit is contained in:
TuxSH
2020-05-18 22:15:34 +01:00
parent 905837468c
commit 704e08dc23
4 changed files with 9 additions and 7 deletions

View File

@@ -140,7 +140,7 @@ u32 Draw_AllocateFramebufferCache(void)
u32 remaining = (u32)osGetMemRegionFree(MEMREGION_SYSTEM);
u32 size = remaining < maxSize ? remaining : maxSize;
if (size < minSize || R_FAILED(svcControlMemory(&tmp, addr, 0, size, MEMOP_ALLOC, MEMPERM_READ | MEMPERM_WRITE)))
if (size < minSize || R_FAILED(svcControlMemoryEx(&tmp, addr, 0, size, MEMOP_ALLOC, MEMREGION_SYSTEM | MEMPERM_READ | MEMPERM_WRITE, true)))
{
framebufferCache = NULL;
framebufferCacheSize = 0;

View File

@@ -12,6 +12,7 @@
#include <3ds/synchronization.h>
#include <3ds/result.h>
#include <string.h>
#include "csvc.h"
s32 miniSocRefCount = 0;
static u32 socContextAddr = 0x08000000;
@@ -75,7 +76,7 @@ Result miniSocInit(void)
ret = srvGetServiceHandle(&miniSocHandle, "soc:U");
if(ret != 0) goto cleanup;
ret = svcControlMemory(&tmp, socContextAddr, 0, socContextSize, MEMOP_ALLOC, MEMPERM_READ | MEMPERM_WRITE);
ret = svcControlMemoryEx(&tmp, socContextAddr, 0, socContextSize, MEMOP_ALLOC, MEMREGION_SYSTEM | MEMPERM_READ | MEMPERM_WRITE, true);
if(ret != 0) goto cleanup;
socContextAddr = tmp;