- [FIX] Crida a Lua es diferent si deshabilitem el debug

This commit is contained in:
2026-05-01 12:26:17 +02:00
parent 90f057fc5e
commit 770971142f

View File

@@ -157,7 +157,15 @@ namespace mini
lua_getglobal(L, "mini"); lua_getglobal(L, "mini");
lua_getfield(L, -1, "init"); lua_getfield(L, -1, "init");
#if defined(DEBUG) && defined(__linux__)
is_playing = debug::call_and_handle_exceptions(L); is_playing = debug::call_and_handle_exceptions(L);
#else
if (lua_pcall(L, 0, 0, 0)) {
log_msg(LOG_LUART, "%s\n", lua_tostring(L, -1));
lua_pop(L,1);
is_playing = false;
}
#endif
} }
void update() { void update() {
@@ -165,7 +173,15 @@ namespace mini
lua_getglobal(L, "mini"); lua_getglobal(L, "mini");
lua_getfield(L, -1, "update"); lua_getfield(L, -1, "update");
#if defined(DEBUG) && defined(__linux__)
is_playing = debug::call_and_handle_exceptions(L); is_playing = debug::call_and_handle_exceptions(L);
#else
if (lua_pcall(L, 0, 0, 0)) {
log_msg(LOG_LUART, "%s\n", lua_tostring(L, -1));
lua_pop(L,1);
is_playing = false;
}
#endif
} }
} }