Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Mar 17, 2024
1 parent 345a3ef commit 46bea66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/plugin/DesktopPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,14 @@ class DesktopPlugin : public Plugin,
return;
}

bufferSizeChanged(getBufferSize());

if (shm.data == nullptr && ! shm.init(availablePortNum))
if (! shm.init(availablePortNum))
{
parameters[kParameterBasePortNumber] = portBaseNum = -kErrorShmSetupFailed;
return;
}

portBaseNum = availablePortNum;
bufferSizeChanged(getBufferSize());
}

~DesktopPlugin()
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/SharedMemory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class SharedMemory
char shmName[32] = {};

#ifdef DISTRHO_OS_WINDOWS
std::snprintf(shmName, 31, "\\Global\\mod-desktop-shm-%d", portBaseNum);
std::snprintf(shmName, 31, "Local\\mod-desktop-shm-%d", portBaseNum);
const HANDLE shm = OpenFileMappingA(FILE_MAP_ALL_ACCESS, FALSE, shmName);

if (shm == nullptr)
Expand Down

0 comments on commit 46bea66

Please sign in to comment.