aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMatthew Hoops2013-07-06 23:54:45 -0400
committerMatthew Hoops2013-07-06 23:54:45 -0400
commit4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc (patch)
tree99da5697f89e53aef119dc1e49d2df9a96c0eae9 /base
parentbd82ca97c228edb1f526a8a88a9f370daab8de95 (diff)
downloadscummvm-rg350-4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc.tar.gz
scummvm-rg350-4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc.tar.bz2
scummvm-rg350-4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc.zip
ALL: Don't use EventRecorder at all when not compiled in
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 3f51c97949..103d743bbc 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -427,6 +427,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// take place after the backend is initiated and the screen has been setup
system.getEventManager()->init();
+#ifdef ENABLE_EVENTRECORDER
// Directly after initializing the event manager, we will initialize our
// event recorder.
//
@@ -434,6 +435,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// our event recorder, we might do this at another place. Or even change
// the whole API for that ;-).
g_eventRec.RegisterEventSource();
+#endif
// Now as the event manager is created, setup the keymapper
setupKeymapper(system);
@@ -471,9 +473,11 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// Try to run the game
Common::Error result = runGame(plugin, system, specialDebug);
+#ifdef ENABLE_EVENTRECORDER
// Flush Event recorder file. The recorder does not get reinitialized for next game
// which is intentional. Only single game per session is allowed.
g_eventRec.deinit();
+#endif
#if defined(UNCACHED_PLUGINS) && defined(DYNAMIC_MODULES)
// do our best to prevent fragmentation by unloading as soon as we can
@@ -526,7 +530,9 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
GUI::GuiManager::destroy();
Common::ConfigManager::destroy();
Common::DebugManager::destroy();
+#ifdef ENABLE_EVENTRECORDER
GUI::EventRecorder::destroy();
+#endif
Common::SearchManager::destroy();
#ifdef USE_TRANSLATION
Common::TranslationManager::destroy();