lua: using protected call for process signals

This commit is contained in:
Turánszki János
2022-10-25 10:31:29 +02:00
parent 50692151cf
commit b6a2967f47
2 changed files with 11 additions and 3 deletions
+10 -2
View File
@@ -296,14 +296,22 @@ namespace wi::lua
{
lua_getglobal(lua_internal().m_luaState, "setDeltaTime");
SSetDouble(lua_internal().m_luaState, dt);
lua_call(lua_internal().m_luaState, 1, 0);
lua_internal().m_status = lua_pcall(lua_internal().m_luaState, 1, LUA_MULTRET, 0);
if (Failed())
{
PostErrorMsg();
}
}
inline void SignalHelper(lua_State* L, const char* str)
{
lua_getglobal(L, "signal");
lua_pushstring(L, str);
lua_call(L, 1, 0);
lua_internal().m_status = lua_pcall(L, 1, LUA_MULTRET, 0);
if (Failed())
{
PostErrorMsg();
}
}
void FixedUpdate()
{
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 71;
// minor bug fixes, alterations, refactors, updates
const int revision = 73;
const int revision = 74;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);