1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Rename SINGLE_INSTANCE_MUTEX_NAME to kSingleInstanceMutexName

This commit is contained in:
Gymnasiast
2025-07-02 20:02:55 +02:00
parent b138f8ccd8
commit 1d75a2d746
2 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@
#include <unistd.h> #include <unistd.h>
// The name of the mutex used to prevent multiple instances of the game from running // The name of the mutex used to prevent multiple instances of the game from running
static constexpr const utf8* SINGLE_INSTANCE_MUTEX_NAME = u8"openrct2.lock"; static constexpr const utf8* kSingleInstanceMutexName = u8"openrct2.lock";
namespace OpenRCT2::Platform namespace OpenRCT2::Platform
{ {
@@ -308,7 +308,7 @@ namespace OpenRCT2::Platform
// take care of that, because flock keeps the lock as long as the // take care of that, because flock keeps the lock as long as the
// file is open and closes it automatically on file close. // file is open and closes it automatically on file close.
// This is intentional. // This is intentional.
int32_t pidFile = open(SINGLE_INSTANCE_MUTEX_NAME, O_CREAT | O_RDWR, 0666); int32_t pidFile = open(kSingleInstanceMutexName, O_CREAT | O_RDWR, 0666);
if (pidFile == -1) if (pidFile == -1)
{ {

View File

@@ -47,7 +47,7 @@
linker, \ linker, \
"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
// The name of the mutex used to prevent multiple instances of the game from running // The name of the mutex used to prevent multiple instances of the game from running
static constexpr wchar_t SINGLE_INSTANCE_MUTEX_NAME[] = L"RollerCoaster Tycoon 2_GSKMUTEX"; static constexpr wchar_t kSingleInstanceMutexName[] = L"RollerCoaster Tycoon 2_GSKMUTEX";
#define SOFTWARE_CLASSES L"Software\\Classes" #define SOFTWARE_CLASSES L"Software\\Classes"
#define MUI_CACHE L"Local Settings\\Software\\Microsoft\\Windows\\Shell\\MuiCache" #define MUI_CACHE L"Local Settings\\Software\\Microsoft\\Windows\\Shell\\MuiCache"
@@ -776,7 +776,7 @@ namespace OpenRCT2::Platform
bool LockSingleInstance() bool LockSingleInstance()
{ {
// Check if operating system mutex exists // Check if operating system mutex exists
HANDLE mutex = CreateMutexW(nullptr, FALSE, SINGLE_INSTANCE_MUTEX_NAME); HANDLE mutex = CreateMutexW(nullptr, FALSE, kSingleInstanceMutexName);
if (mutex == nullptr) if (mutex == nullptr)
{ {
LOG_ERROR("unable to create mutex"); LOG_ERROR("unable to create mutex");