aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-06-06 09:53:16 +0200
committerEugene Sandulenko2019-09-03 17:16:43 +0200
commit869b109eeb8702c86e01266e7e23ba800e4cfcb6 (patch)
tree3e929713c54d9e7152e3ad396e80ef2fecd1905f /engines
parent418ad2c94e0e86c04ea8f19760cd3344db99647b (diff)
downloadscummvm-rg350-869b109eeb8702c86e01266e7e23ba800e4cfcb6.tar.gz
scummvm-rg350-869b109eeb8702c86e01266e7e23ba800e4cfcb6.tar.bz2
scummvm-rg350-869b109eeb8702c86e01266e7e23ba800e4cfcb6.zip
HDB: Hid Lua execution trace to debug level 8
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/lua-script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp
index 56e0ead5e8..f5f00930ff 100644
--- a/engines/hdb/lua-script.cpp
+++ b/engines/hdb/lua-script.cpp
@@ -667,8 +667,10 @@ bool LuaScript::initScript(Common::SeekableReadStream *stream, int32 length) {
// Place the error handler function in the Lua registry, and remember the index
_pcallErrorhandlerRegistryIndex = luaL_ref(_state, LUA_REGISTRYINDEX);
- // Initialize debugging callback
- lua_sethook(_state, debugHook, LUA_MASKCALL | LUA_MASKLINE, 0);
+ if (gDebugLevel >= 8) {
+ // Initialize debugging callback
+ lua_sethook(_state, debugHook, LUA_MASKCALL | LUA_MASKLINE, 0);
+ }
// Load GLOBAL_LUA and execute it