- [FIX] Crida a Lua es diferent si deshabilitem el debug
This commit is contained in:
@@ -157,7 +157,15 @@ namespace mini
|
||||
lua_getglobal(L, "mini");
|
||||
lua_getfield(L, -1, "init");
|
||||
|
||||
is_playing = debug::call_and_handle_exceptions(L);
|
||||
#if defined(DEBUG) && defined(__linux__)
|
||||
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() {
|
||||
@@ -165,7 +173,15 @@ namespace mini
|
||||
lua_getglobal(L, "mini");
|
||||
lua_getfield(L, -1, "update");
|
||||
|
||||
is_playing = debug::call_and_handle_exceptions(L);
|
||||
#if defined(DEBUG) && defined(__linux__)
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user