Fix Shared Memory in Windows
Some checks failed
Build / Linux (push) Has been cancelled
Build / Windows (push) Has been cancelled

- Windows does not allow paths as mutexes
- Remove the config directory from the mutex name
- This fix has the potential for collision of concerns on Windows when running multiple instances, but it is an unlikely scenario given port requirements
This commit is contained in:
Knightly 2025-12-23 18:46:17 -10:00 committed by Alex
parent af6c3ec97d
commit be493435cb

View File

@ -47,8 +47,7 @@ namespace EQ {
IPCMutex::IPCMutex(const std::string& name) : locked_(false) {
imp_ = new Implementation;
#ifdef _WINDOWS
auto Config = EQEmuConfig::get();
std::string final_name = fmt::format("{}/EQEmuMutex_{}", Config->SharedMemDir, name);
std::string final_name = fmt::format("EQEmuMutex_{}", name);
imp_->mut_ = CreateMutex(nullptr,
FALSE,