diff options
Diffstat (limited to 'engines/sword25/input')
-rw-r--r-- | engines/sword25/input/inputengine_script.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp index 0ada7ece5c..f68b265297 100644 --- a/engines/sword25/input/inputengine_script.cpp +++ b/engines/sword25/input/inputengine_script.cpp @@ -83,13 +83,6 @@ protected: static CommandCallbackClass *commandCallbackPtr = 0; // FIXME: should be turned into InputEngine member var -struct CallbackfunctionRegisterer { - CallbackfunctionRegisterer() { - CallbackRegistry::instance().registerCallbackFunction("LuaCommandCB", theCommandCallback); - CallbackRegistry::instance().registerCallbackFunction("LuaCharacterCB", theCharacterCallback); - } -}; -static CallbackfunctionRegisterer instance; } static InputEngine *getIE() { @@ -298,6 +291,9 @@ bool InputEngine::registerScriptBindings() { assert(commandCallbackPtr == 0); commandCallbackPtr = new CommandCallbackClass(L); + CallbackRegistry::instance().registerCallbackFunction("LuaCommandCB", theCommandCallback); + CallbackRegistry::instance().registerCallbackFunction("LuaCharacterCB", theCharacterCallback); + return true; } |