From 40b68b41c7a507dad5a1d38813bfa7f89e7c6551 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Fri, 30 Dec 2011 11:50:15 -0600 Subject: KEYMAPPER: Make engine keymap init and cleanup more generic --- base/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'base') diff --git a/base/main.cpp b/base/main.cpp index 61a05154c1..b4cfd45689 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -203,6 +203,9 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const warning(_("Engine does not support debug level '%s'"), token.c_str()); } + // Initialize any game-specific keymaps + engine->initKeymap(); + // Inform backend that the engine is about to be run system.engineInit(); @@ -212,6 +215,9 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const // Inform backend that the engine finished system.engineDone(); + // Clean up any game-specific keymaps + engine->deinitKeymap(); + // Free up memory delete engine; -- cgit v1.2.3