mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Common/MemArena: Pass shared memory base file name to GrabSHMSegment().
This commit is contained in:
@ -8,6 +8,8 @@
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
@ -107,9 +109,9 @@ static DWORD GetLowDWORD(u64 value)
|
||||
return static_cast<DWORD>(value);
|
||||
}
|
||||
|
||||
void MemArena::GrabSHMSegment(size_t size)
|
||||
void MemArena::GrabSHMSegment(size_t size, std::string_view base_name)
|
||||
{
|
||||
const std::string name = "dolphin-emu." + std::to_string(GetCurrentProcessId());
|
||||
const std::string name = fmt::format("{}.{}", base_name, GetCurrentProcessId());
|
||||
m_memory_handle =
|
||||
CreateFileMapping(INVALID_HANDLE_VALUE, nullptr, PAGE_READWRITE, GetHighDWORD(size),
|
||||
GetLowDWORD(size), UTF8ToTStr(name).c_str());
|
||||
|
Reference in New Issue
Block a user