From e0aa10c42b2a8d508bebc53ad9bb14fc17fa67c1 Mon Sep 17 00:00:00 2001 From: Death Killer <884052+deathkiller@users.noreply.github.com> Date: Mon, 19 Feb 2024 23:27:51 +0100 Subject: [PATCH] Fixed build --- Sources/Jazz2/PreferencesCache.cpp | 2 +- Sources/backward/backward.h | 20 ++++++-------------- cmake/ncine_extra_sources.cmake | 1 - cmake/ncine_options.cmake | 5 ++++- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Sources/Jazz2/PreferencesCache.cpp b/Sources/Jazz2/PreferencesCache.cpp index 0fc26ec3..b62d46ea 100644 --- a/Sources/Jazz2/PreferencesCache.cpp +++ b/Sources/Jazz2/PreferencesCache.cpp @@ -204,7 +204,7 @@ namespace Jazz2 std::uint8_t controlMappingCount = uc.ReadValue(); for (std::uint32_t i = 0; i < playerCount; i++) { for (std::uint32_t j = 0; j < controlMappingCount; j++) { - std:uint8_t targetCount = uc.ReadValue(); + std::uint8_t targetCount = uc.ReadValue(); if (i < UI::ControlScheme::MaxSupportedPlayers && j < (std::uint32_t)PlayerActions::Count) { auto& mapping = mappings[i * (std::uint32_t)PlayerActions::Count + j]; mapping.Targets.clear(); diff --git a/Sources/backward/backward.h b/Sources/backward/backward.h index 2ae3e415..bd6ed52f 100644 --- a/Sources/backward/backward.h +++ b/Sources/backward/backward.h @@ -53,18 +53,13 @@ // #define BACKWARD_SYSTEM_WINDOWS // - specialization for Windows (Clang 9 and MSVC2017) // - // #define BACKWARD_SYSTEM_UNKNOWN - // - placebo implementation, does nothing. - // -#if !(defined(BACKWARD_SYSTEM_LINUX) || defined(BACKWARD_SYSTEM_DARWIN) || defined(BACKWARD_SYSTEM_UNKNOWN) || defined(BACKWARD_SYSTEM_WINDOWS)) +#if !(defined(BACKWARD_SYSTEM_LINUX) || defined(BACKWARD_SYSTEM_DARWIN) || defined(BACKWARD_SYSTEM_WINDOWS)) # if defined(__linux) || defined(__linux__) # define BACKWARD_SYSTEM_LINUX # elif defined(DEATH_TARGET_APPLE) # define BACKWARD_SYSTEM_DARWIN # elif defined(DEATH_TARGET_WINDOWS) # define BACKWARD_SYSTEM_WINDOWS -# else -# define BACKWARD_SYSTEM_UNKNOWN # endif #endif @@ -434,7 +429,6 @@ namespace backward { struct linux_tag; // seems that I cannot call that "linux" because the name is already defined... so I am adding _tag everywhere. struct darwin_tag; struct windows_tag; - struct unknown_tag; #if defined(BACKWARD_SYSTEM_LINUX) typedef linux_tag current_tag; @@ -442,10 +436,8 @@ namespace backward { typedef darwin_tag current_tag; #elif defined(BACKWARD_SYSTEM_WINDOWS) typedef windows_tag current_tag; -#elif defined(BACKWARD_SYSTEM_UNKNOWN) - typedef unknown_tag current_tag; #else -# error "May I please get my system defines?" +# error "Unsupported platform" #endif } // namespace system_tag @@ -1282,12 +1274,12 @@ namespace backward { template class TraceResolverImpl; -#if defined(BACKWARD_SYSTEM_UNKNOWN) +/*#if defined(BACKWARD_SYSTEM_UNKNOWN) template<> class TraceResolverImpl : public TraceResolverImplBase {}; -#endif +#endif*/ #if defined(BACKWARD_SYSTEM_LINUX) @@ -4458,7 +4450,7 @@ namespace backward { #endif // BACKWARD_SYSTEM_WINDOWS -#if defined(BACKWARD_SYSTEM_UNKNOWN) +/*#if defined(BACKWARD_SYSTEM_UNKNOWN) class SignalHandling { public: @@ -4471,7 +4463,7 @@ namespace backward { } }; -#endif // BACKWARD_SYSTEM_UNKNOWN +#endif*/ } // namespace backward diff --git a/cmake/ncine_extra_sources.cmake b/cmake/ncine_extra_sources.cmake index 7ff7165d..3610c260 100644 --- a/cmake/ncine_extra_sources.cmake +++ b/cmake/ncine_extra_sources.cmake @@ -21,7 +21,6 @@ endif() if(BACKWARD_FOUND) target_compile_definitions(${NCINE_APP} PRIVATE "WITH_BACKWARD") target_link_libraries(${NCINE_APP} PRIVATE Backward::Interface) - message(STATUS "Building the game with Backward integration") endif() if(ANGLE_FOUND OR OPENGLES2_FOUND) diff --git a/cmake/ncine_options.cmake b/cmake/ncine_options.cmake index 0c4ef303..ccbf6426 100644 --- a/cmake/ncine_options.cmake +++ b/cmake/ncine_options.cmake @@ -56,6 +56,10 @@ else() if((WIN32 OR NOT NCINE_ARM_PROCESSOR) AND NOT ANDROID AND NOT NCINE_BUILD_ANDROID AND NOT NINTENDO_SWITCH) option(NCINE_WITH_GLEW "Use GLEW library" ON) endif() + + if(NOT WINDOWS_PHONE AND NOT WINDOWS_STORE) + option(NCINE_WITH_BACKWARD "Enable integration with Backward for better stack traces" ON) + endif() endif() option(NCINE_WITH_WEBP "Enable WebP image file support" OFF) @@ -64,7 +68,6 @@ cmake_dependent_option(NCINE_WITH_VORBIS "Enable Ogg Vorbis audio file support" cmake_dependent_option(NCINE_WITH_OPENMPT "Enable module (libopenmpt) audio file support" ON "NCINE_WITH_AUDIO" OFF) option(NCINE_WITH_ANGELSCRIPT "Enable AngelScript scripting support" OFF) option(NCINE_WITH_IMGUI "Enable integration with Dear ImGui" OFF) -option(NCINE_WITH_BACKWARD "Enable integration with Backward for better stack traces" ON) option(NCINE_WITH_TRACY "Enable integration with Tracy frame profiler" OFF) option(NCINE_WITH_RENDERDOC "Enable integration with RenderDoc" OFF)