From 3fb6dc741b61e8e6826665e580883f14961166e1 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Mon, 29 Mar 2021 15:13:09 +0800 Subject: [PATCH] Disable hide on debug build --- core/src/main/cpp/main/include/config.h | 10 ++++++++++ core/src/main/cpp/main/src/main.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/src/main/cpp/main/include/config.h b/core/src/main/cpp/main/include/config.h index 1ec6d7ca..c32c6cfb 100644 --- a/core/src/main/cpp/main/include/config.h +++ b/core/src/main/cpp/main/include/config.h @@ -42,6 +42,16 @@ namespace lspd { inline constexpr bool is64 = Is64(); + inline bool constexpr IsDebug() { +#ifdef NDEBUG + return false; +#else + return true; +#endif + } + + inline constexpr bool isDebug = IsDebug(); + #if defined(__LP64__) # define LP_SELECT(lp32, lp64) lp64 #else diff --git a/core/src/main/cpp/main/src/main.cpp b/core/src/main/cpp/main/src/main.cpp index 57085948..c411b846 100644 --- a/core/src/main/cpp/main/src/main.cpp +++ b/core/src/main/cpp/main/src/main.cpp @@ -98,7 +98,7 @@ namespace lspd { RiruVersionedModuleInfo module{ .moduleApiVersion = RIRU_MODULE_API_VERSION, .moduleInfo = RiruModuleInfo{ - .supportHide = true, + .supportHide = !isDebug, .version = RIRU_MODULE_VERSION, .versionName = RIRU_MODULE_VERSION_NAME, .onModuleLoaded = lspd::onModuleLoaded,