aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-18 08:15:28 -0700
committerEugene Sandulenko2013-07-18 08:15:28 -0700
commit2c812ade01714351aeda3dbbe877d376ad3d48ca (patch)
tree61daae8cca200b51fdea0c82ecc2d555e97ba865 /gui
parent2eb26ad02ead5fc65cc206cb287ff04c84eba4e8 (diff)
parent4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc (diff)
downloadscummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.tar.gz
scummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.tar.bz2
scummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.zip
Merge pull request #353 from clone2727/eventrec_timer_fix
ALL: Don't use EventRecorder at all when not compiled in
Diffstat (limited to 'gui')
-rw-r--r--gui/EventRecorder.cpp4
-rw-r--r--gui/EventRecorder.h55
-rw-r--r--gui/gui-manager.cpp4
3 files changed, 6 insertions, 57 deletions
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index 89a226922a..fd0093d266 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -23,12 +23,12 @@
#include "gui/EventRecorder.h"
+#ifdef ENABLE_EVENTRECORDER
+
namespace Common {
DECLARE_SINGLETON(GUI::EventRecorder);
}
-#ifdef ENABLE_EVENTRECORDER
-
#include "common/debug-channels.h"
#include "backends/timer/sdl/sdl-timer.h"
#include "backends/mixer/sdl/sdl-mixer.h"
diff --git a/gui/EventRecorder.h b/gui/EventRecorder.h
index 60fe07fafc..68ffe16fbc 100644
--- a/gui/EventRecorder.h
+++ b/gui/EventRecorder.h
@@ -233,61 +233,6 @@ private:
} // End of namespace GUI
-#else
-
-#ifdef SDL_BACKEND
-#include "backends/timer/default/default-timer.h"
-#include "backends/mixer/sdl/sdl-mixer.h"
-#endif
-
-#define g_eventRec (GUI::EventRecorder::instance())
-
-namespace GUI {
-
-class EventRecorder : private Common::EventSource, public Common::Singleton<EventRecorder>, private Common::DefaultEventMapper {
- friend class Common::Singleton<SingletonBaseType>;
-
- public:
- EventRecorder() {
-#ifdef SDL_BACKEND
- _timerManager = NULL;
- _realMixerManager = NULL;
-#endif
- }
- ~EventRecorder() {}
-
- bool pollEvent(Common::Event &ev) { return false; }
- void RegisterEventSource() {}
- void deinit() {}
- void suspendRecording() {}
- void resumeRecording() {}
- void preDrawOverlayGui() {}
- void postDrawOverlayGui() {}
- void processGameDescription(const ADGameDescription *desc) {}
- void updateSubsystems() {}
- uint32 getRandomSeed(const Common::String &name) { return g_system->getMillis(); }
- Common::SaveFileManager *getSaveManager(Common::SaveFileManager *realSaveManager) { return realSaveManager; }
-
-#ifdef SDL_BACKEND
- private:
- DefaultTimerManager *_timerManager;
- SdlMixerManager *_realMixerManager;
-
- public:
- DefaultTimerManager *getTimerManager() { return _timerManager; }
- void registerTimerManager(DefaultTimerManager *timerManager) { _timerManager = timerManager; }
-
- SdlMixerManager *getMixerManager() { return _realMixerManager; }
- void registerMixerManager(SdlMixerManager *mixerManager) { _realMixerManager = mixerManager; }
-
- void processMillis(uint32 &millis, bool skipRecord) {}
- bool processDelayMillis() { return false; }
-#endif
-
-};
-
-} // namespace GUI
-
#endif // ENABLE_EVENTRECORDER
#endif
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 78b40a46ce..1505c8c707 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -258,8 +258,10 @@ void GuiManager::runLoop() {
if (activeDialog == 0)
return;
+#ifdef ENABLE_EVENTRECORDER
// Suspend recording while GUI is shown
g_eventRec.suspendRecording();
+#endif
if (!_stateIsSaved) {
saveState();
@@ -361,8 +363,10 @@ void GuiManager::runLoop() {
_useStdCursor = false;
}
+#ifdef ENABLE_EVENTRECORDER
// Resume recording once GUI is shown
g_eventRec.resumeRecording();
+#endif
}
#pragma mark -