Skip to content

Commit

Permalink
MemArena: Name shared memory handle
Browse files Browse the repository at this point in the history
Assign a name to the CreateFileMapping handle on Win32 so third party
applications can read from Dolphin's memory and integrate with the
current emulation.

Built and tested, multiple sessions are still possible without
collisions.
  • Loading branch information
TheFreezebug authored and leoetlino committed Oct 11, 2017
1 parent 90ca2e8 commit 4dfe6c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Common/MemArena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ static int AshmemCreateFileMapping(const char* name, size_t size)
void MemArena::GrabSHMSegment(size_t size)
{
#ifdef _WIN32
hMemoryMapping =
CreateFileMapping(INVALID_HANDLE_VALUE, nullptr, PAGE_READWRITE, 0, (DWORD)(size), nullptr);
hMemoryMapping = CreateFileMapping(INVALID_HANDLE_VALUE, nullptr, PAGE_READWRITE, 0,
static_cast<DWORD>(size), L"Dolphin-emu");
#elif defined(ANDROID)
fd = AshmemCreateFileMapping("Dolphin-emu", size);
if (fd < 0)
Expand Down

0 comments on commit 4dfe6c0

Please sign in to comment.