mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
Common/MemArena: Pass shared memory base file name to GrabSHMSegment().
This commit is contained in:
parent
ff5bcba966
commit
8342164dbd
5 changed files with 18 additions and 8 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue