Permalink
Browse files

attempt to reduce "script is not responding" when debugging (valgrind…

… / breakpoints)
  • Loading branch information...
jacob1 committed Jul 29, 2017
1 parent b02a72a commit adb39b91a964ff13092e1f033e08c22134e57342
Showing with 4 additions and 3 deletions.
  1. +1 −1 src/gui/game/GameView.cpp
  2. +3 −0 src/lua/LegacyLuaAPI.cpp
  3. +0 −2 src/lua/LuaScriptInterface.cpp
@@ -1735,7 +1735,7 @@ void GameView::OnTick(float dt)
if (foundSign)
{
const char* str = foundSign->text.c_str();
char type;
char type = '\0';
int pos = sign::splitsign(str, &type);
if (type == 'c' || type == 't' || type == 's')
{
@@ -446,6 +446,7 @@ int luacon_elementwrite(lua_State* l)
bool shortcuts = true;
int luacon_keyevent(int key, Uint16 character, int modifier, int event)
{
ui::Engine::Ref().LastTick(Platform::GetTime());
int kycontinue = 1;
lua_State* l=luacon_ci->l;
lua_pushstring(l, "keyfunctions");
@@ -501,6 +502,7 @@ int luacon_keyevent(int key, Uint16 character, int modifier, int event)
int luacon_mouseevent(int mx, int my, int mb, int event, int mouse_wheel)
{
ui::Engine::Ref().LastTick(Platform::GetTime());
int mpcontinue = 1;
lua_State* l=luacon_ci->l;
lua_pushstring(l, "mousefunctions");
@@ -554,6 +556,7 @@ int luacon_mouseevent(int mx, int my, int mb, int event, int mouse_wheel)
int luacon_step(int mx, int my)
{
ui::Engine::Ref().LastTick(Platform::GetTime());
lua_State* l = luacon_ci->l;
lua_pushinteger(l, my);
lua_pushinteger(l, mx);
@@ -3473,7 +3473,6 @@ bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, boo
bool LuaScriptInterface::OnMouseTick()
{
ui::Engine::Ref().LastTick(Platform::GetTime());
if (luacon_mousedown)
return luacon_mouseevent(luacon_mousex, luacon_mousey, luacon_mousebutton, LUACON_MPRESS, 0);
return true;
@@ -3488,7 +3487,6 @@ void LuaScriptInterface::OnTick()
lua_setfield(l, -2, "NUM_PARTS");
}
lua_pop(l, 1);
ui::Engine::Ref().LastTick(Platform::GetTime());
luacon_step(luacon_mousex, luacon_mousey);
}

0 comments on commit adb39b9

Please sign in to comment.