From 1d75a2d7468dd75534b8643d585564848d39ba93 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 2 Jul 2025 20:02:55 +0200 Subject: [PATCH] Rename SINGLE_INSTANCE_MUTEX_NAME to kSingleInstanceMutexName --- src/openrct2/platform/Platform.Posix.cpp | 4 ++-- src/openrct2/platform/Platform.Win32.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/platform/Platform.Posix.cpp b/src/openrct2/platform/Platform.Posix.cpp index 2d525c6183..dfeda0de99 100644 --- a/src/openrct2/platform/Platform.Posix.cpp +++ b/src/openrct2/platform/Platform.Posix.cpp @@ -32,7 +32,7 @@ #include // 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 { @@ -308,7 +308,7 @@ namespace OpenRCT2::Platform // take care of that, because flock keeps the lock as long as the // file is open and closes it automatically on file close. // 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) { diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index 9395dc81c5..8da9216b3b 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -47,7 +47,7 @@ linker, \ "\"/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 -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 MUI_CACHE L"Local Settings\\Software\\Microsoft\\Windows\\Shell\\MuiCache" @@ -776,7 +776,7 @@ namespace OpenRCT2::Platform bool LockSingleInstance() { // Check if operating system mutex exists - HANDLE mutex = CreateMutexW(nullptr, FALSE, SINGLE_INSTANCE_MUTEX_NAME); + HANDLE mutex = CreateMutexW(nullptr, FALSE, kSingleInstanceMutexName); if (mutex == nullptr) { LOG_ERROR("unable to create mutex");