lua: using protected call for process signals
This commit is contained in:
+10
-2
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user