diff options
author | Eugene Sandulenko | 2011-08-08 15:38:27 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2011-08-08 20:01:07 +0100 |
commit | a4029a8e94a3dbbe03c0aa4571215e9a5b00058d (patch) | |
tree | a18d45985ba3d452cfe68fe3a1408b6aa910ff38 /base | |
parent | 4144fef5a7404bfab8dd127cc9d09694de89e997 (diff) | |
download | scummvm-rg350-a4029a8e94a3dbbe03c0aa4571215e9a5b00058d.tar.gz scummvm-rg350-a4029a8e94a3dbbe03c0aa4571215e9a5b00058d.tar.bz2 scummvm-rg350-a4029a8e94a3dbbe03c0aa4571215e9a5b00058d.zip |
RECORDER: Restore event recorder functionality.
It was badly broken after refactoring into EventObserver.
Fitst, deinit() method was never called which lead to bad record
files. Then, the concept of counting pollEvent() calls was ignored.
Introduced dispatchPoll() method of EventObserver which is implemented
in EventRecorder. It counts calls so is able to inject events at
more proper time.
Additionally now event times are recorded.
Diffstat (limited to 'base')
-rw-r--r-- | base/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/base/main.cpp b/base/main.cpp index 717ccb3344..780015d307 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -419,6 +419,10 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { // Try to run the game Common::Error result = runGame(plugin, system, specialDebug); + // 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(); + #if defined(UNCACHED_PLUGINS) && defined(DYNAMIC_MODULES) // do our best to prevent fragmentation by unloading as soon as we can PluginManager::instance().unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false); |