From ca5fc105c011e96341448ea1296e1eb0fc612bd7 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Thu, 18 Jul 2024 22:35:13 -0400 Subject: [PATCH] Add RC_CLIENT_SUPPORTS_RAINTEGRATION compile flag Flag is only turned on in Windows as the developer tool windows require Windows hooks to render and function. --- CMakeLists.txt | 7 +++++++ Externals/rcheevos/CMakeLists.txt | 1 + Externals/rcheevos/rcheevos.vcxproj | 2 +- Source/Core/Core/CMakeLists.txt | 3 +++ Source/Core/DolphinQt/CMakeLists.txt | 3 +++ Source/VSProps/Base.Dolphin.props | 1 + 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3495e3b2b3..2e6b4156fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,13 @@ option(OPROFILING "Enable profiling" OFF) # TODO: Add DSPSpy option(DSPTOOL "Build dsptool" OFF) +# RetroAchievements developer tools require Windows hooks +if(WIN32) + option(RC_CLIENT_SUPPORTS_RAINTEGRATION "Enables RetroAchievements developer tools" ON) +else() + option(RC_CLIENT_SUPPORTS_RAINTEGRATION "Enables RetroAchievements developer tools" OFF) +endif() + # Enable SDL by default on operating systems that aren't Android. if(NOT ANDROID) option(ENABLE_SDL "Enables SDL as a generic controller backend" ON) diff --git a/Externals/rcheevos/CMakeLists.txt b/Externals/rcheevos/CMakeLists.txt index f8d9bee8da..72a430b7af 100644 --- a/Externals/rcheevos/CMakeLists.txt +++ b/Externals/rcheevos/CMakeLists.txt @@ -62,5 +62,6 @@ target_include_directories(rcheevos INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") target_compile_definitions(rcheevos PRIVATE "RC_DISABLE_LUA=1" "RCHEEVOS_URL_SSL") target_compile_definitions(rcheevos PRIVATE "RC_CLIENT_SUPPORTS_HASH") if(CMAKE_SYSTEM_NAME MATCHES "Windows") + target_compile_definitions(rcheevos PRIVATE "RC_CLIENT_SUPPORTS_RAINTEGRATION") target_compile_definitions(rcheevos PRIVATE "_CRT_SECURE_NO_WARNINGS") endif() diff --git a/Externals/rcheevos/rcheevos.vcxproj b/Externals/rcheevos/rcheevos.vcxproj index 51a94c7750..5e685c44e8 100644 --- a/Externals/rcheevos/rcheevos.vcxproj +++ b/Externals/rcheevos/rcheevos.vcxproj @@ -76,7 +76,7 @@ - RC_DISABLE_LUA;RCHEEVOS_URL_SSL;RC_CLIENT_SUPPORTS_HASH;%(PreprocessorDefinitions) + RC_DISABLE_LUA;RCHEEVOS_URL_SSL;RC_CLIENT_SUPPORTS_HASH;RC_CLIENT_SUPPORTS_RAINTEGRATION;%(PreprocessorDefinitions) $(ProjectDir)rcheevos\include;%(AdditionalIncludeDirectories) diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index 4704b340b2..6eaf190071 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -780,4 +780,7 @@ if(USE_RETRO_ACHIEVEMENTS) target_link_libraries(core PUBLIC rcheevos) target_compile_definitions(core PUBLIC -DUSE_RETRO_ACHIEVEMENTS) target_compile_definitions(core PUBLIC -DRC_CLIENT_SUPPORTS_HASH) + if(RC_CLIENT_SUPPORTS_RAINTEGRATION) + target_compile_definitions(core PUBLIC -DRC_CLIENT_SUPPORTS_RAINTEGRATION) + endif() endif() diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index bd766e0453..baad233976 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -671,4 +671,7 @@ endif() if(USE_RETRO_ACHIEVEMENTS) target_link_libraries(dolphin-emu PRIVATE rcheevos) target_compile_definitions(dolphin-emu PRIVATE -DUSE_RETRO_ACHIEVEMENTS) + if(RC_CLIENT_SUPPORTS_RAINTEGRATION) + target_compile_definitions(dolphin-emu PRIVATE -DRC_CLIENT_SUPPORTS_RAINTEGRATION) + endif() endif() diff --git a/Source/VSProps/Base.Dolphin.props b/Source/VSProps/Base.Dolphin.props index d3ef409c9e..7db4f80e64 100644 --- a/Source/VSProps/Base.Dolphin.props +++ b/Source/VSProps/Base.Dolphin.props @@ -47,6 +47,7 @@ STEAM;%(PreprocessorDefinitions) USE_RETRO_ACHIEVEMENTS;%(PreprocessorDefinitions) RC_CLIENT_SUPPORTS_HASH;%(PreprocessorDefinitions) + RC_CLIENT_SUPPORTS_RAINTEGRATION;%(PreprocessorDefinitions)