mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
fix #994
This commit is contained in:
parent
e7ee3b7bc8
commit
891427c75c
@ -713,9 +713,15 @@ void Init()
|
||||
|
||||
MemoryBase = (u8*)VirtualAlloc(NULL, AddrSpaceSize*4, MEM_RESERVE, PAGE_READWRITE);
|
||||
VirtualFree(MemoryBase, 0, MEM_RELEASE);
|
||||
FastMem9Start = MemoryBase;
|
||||
FastMem7Start = MemoryBase + AddrSpaceSize;
|
||||
MemoryBase = MemoryBase + AddrSpaceSize*2;
|
||||
// this is incredible hacky
|
||||
// but someone else is trying to go into our address space!
|
||||
// Windows will very likely give them virtual memory starting at the same address
|
||||
// as it is giving us now.
|
||||
// That's why we don't use this address, but instead 4gb inwards
|
||||
// I know this is terrible
|
||||
FastMem9Start = MemoryBase + AddrSpaceSize;
|
||||
FastMem7Start = MemoryBase + AddrSpaceSize*2;
|
||||
MemoryBase = MemoryBase + AddrSpaceSize*3;
|
||||
|
||||
MapViewOfFileEx(MemoryFile, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, MemoryTotalSize, MemoryBase);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user