Fix Shared Memory in Windows

- 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
parent 6c057308da
commit e3e1340156

View File

@ -44,8 +44,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,