From 4dfe6c08755882d2009b3fa70fa284f3cc398399 Mon Sep 17 00:00:00 2001 From: "Dane Z. Bush" Date: Sat, 30 Sep 2017 14:59:07 -0400 Subject: [PATCH] MemArena: Name shared memory handle 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. --- Source/Core/Common/MemArena.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/MemArena.cpp b/Source/Core/Common/MemArena.cpp index 082670d2b3..d9b3d1a37c 100644 --- a/Source/Core/Common/MemArena.cpp +++ b/Source/Core/Common/MemArena.cpp @@ -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(size), L"Dolphin-emu"); #elif defined(ANDROID) fd = AshmemCreateFileMapping("Dolphin-emu", size); if (fd < 0)