From 90f057fc5ee337b187316b95aff6c3a3e0c41bf1 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Fri, 1 May 2026 12:10:11 +0200 Subject: [PATCH] - [FIX] deshabilitar el debugger si no estem en DEBUG ni en Linux --- source/mini/lua/lua.debug.cpp | 4 ++++ source/mini/lua/lua.debug.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/source/mini/lua/lua.debug.cpp b/source/mini/lua/lua.debug.cpp index ff77ec5..c84c9b3 100644 --- a/source/mini/lua/lua.debug.cpp +++ b/source/mini/lua/lua.debug.cpp @@ -1,3 +1,5 @@ +#if defined(DEBUG) && defined(__linux__) + #include "lua.debug.h" #include "external/lua/lua.hpp" #include "mini/win/win.h" @@ -1366,3 +1368,5 @@ namespace mini } } } + +#endif diff --git a/source/mini/lua/lua.debug.h b/source/mini/lua/lua.debug.h index 9fc8b75..5cd063d 100644 --- a/source/mini/lua/lua.debug.h +++ b/source/mini/lua/lua.debug.h @@ -7,11 +7,19 @@ namespace mini { namespace debug { + #if defined(DEBUG) && defined(__linux__) bool call_and_handle_exceptions(lua_State* L); void init(lua_State* L); void kill_thread(); void process_commands(lua_State* L); void toggle(lua_State* L); + #else + bool call_and_handle_exceptions(lua_State* L) { return true; }; + void init(lua_State* L) {}; + void kill_thread() {}; + void process_commands(lua_State* L) {}; + void toggle(lua_State* L) {}; + #endif } }