Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
[linux] disable check for duplicate instances (CreateEventA)
Browse files Browse the repository at this point in the history
  • Loading branch information
q4a committed Jun 6, 2022
1 parent 6a41ee9 commit 92b6b5b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/apps/engine/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ void HandleWindowEvent(const storm::OSWindow::Event &event)
int main(int argc, char *argv[])
{
// Prevent multiple instances
#ifdef _WIN32 // CreateEventA
if (!CreateEventA(nullptr, false, false, "Global\\FBBD2286-A9F1-4303-B60C-743C3D7AA7BE") ||
GetLastError() == ERROR_ALREADY_EXISTS)
#else
if (false)
#endif
{
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Another instance is already running!", nullptr);
return EXIT_SUCCESS;
Expand Down

0 comments on commit 92b6b5b

Please sign in to comment.