Merge pull request #12870 from LillyJadeKatrin/retroachievements-gdb-disable

Disable GDB Stub in Hardcore Mode
This commit is contained in:
Admiral H. Curtiss 2024-06-17 22:39:23 +02:00 committed by GitHub
commit a0d8c1088d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,7 +398,7 @@ static void CpuThread(Core::System& system, const std::optional<std::string>& sa
{ {
#ifndef _WIN32 #ifndef _WIN32
std::string gdb_socket = Config::Get(Config::MAIN_GDB_SOCKET); std::string gdb_socket = Config::Get(Config::MAIN_GDB_SOCKET);
if (!gdb_socket.empty()) if (!gdb_socket.empty() && !AchievementManager::GetInstance().IsHardcoreModeActive())
{ {
GDBStub::InitLocal(gdb_socket.data()); GDBStub::InitLocal(gdb_socket.data());
CPUSetInitialExecutionState(true); CPUSetInitialExecutionState(true);
@ -407,7 +407,7 @@ static void CpuThread(Core::System& system, const std::optional<std::string>& sa
#endif #endif
{ {
int gdb_port = Config::Get(Config::MAIN_GDB_PORT); int gdb_port = Config::Get(Config::MAIN_GDB_PORT);
if (gdb_port > 0) if (gdb_port > 0 && !AchievementManager::GetInstance().IsHardcoreModeActive())
{ {
GDBStub::Init(gdb_port); GDBStub::Init(gdb_port);
CPUSetInitialExecutionState(true); CPUSetInitialExecutionState(true);