aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp2
-rw-r--r--backends/modular-backend.cpp6
-rw-r--r--backends/platform/sdl/sdl.cpp27
-rw-r--r--backends/platform/tizen/form.cpp6
4 files changed, 37 insertions, 4 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 1ebd019488..a2e1981e79 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -773,7 +773,7 @@ bool SurfaceSdlGraphicsManager::loadGFXMode() {
if (_displayDisabled) {
_hwscreen = g_eventRec.getSurface(_videoMode.hardwareWidth, _videoMode.hardwareHeight);
- } else
+ } else
#endif
{
_hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 16,
diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index d84df75439..6afe06aeca 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -142,9 +142,15 @@ void ModularBackend::fillScreen(uint32 col) {
}
void ModularBackend::updateScreen() {
+#ifdef ENABLE_EVENTRECORDER
g_eventRec.preDrawOverlayGui();
+#endif
+
_graphicsManager->updateScreen();
+
+#ifdef ENABLE_EVENTRECORDER
g_eventRec.postDrawOverlayGui();
+#endif
}
void ModularBackend::setShakePos(int shakeOffset) {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index f55dd277c7..7ab367d4a4 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -98,7 +98,13 @@ OSystem_SDL::~OSystem_SDL() {
delete _mixerManager;
_mixerManager = 0;
+#ifdef ENABLE_EVENTRECORDER
+ // HACK HACK HACK
+ // This is nasty.
delete g_eventRec.getTimerManager();
+#else
+ delete _timerManager;
+#endif
_timerManager = 0;
delete _mutexManager;
@@ -193,9 +199,15 @@ void OSystem_SDL::initBackend() {
// Setup and start mixer
_mixerManager->init();
}
+
+#ifdef ENABLE_EVENTRECORDER
g_eventRec.registerMixerManager(_mixerManager);
g_eventRec.registerTimerManager(new SdlTimerManager());
+#else
+ if (_timerManager == 0)
+ _timerManager = new SdlTimerManager();
+#endif
if (_audiocdManager == 0) {
// Audio CD support was removed with SDL 1.3
@@ -470,12 +482,18 @@ void OSystem_SDL::setupIcon() {
uint32 OSystem_SDL::getMillis(bool skipRecord) {
uint32 millis = SDL_GetTicks();
+
+#ifdef ENABLE_EVENTRECORDER
g_eventRec.processMillis(millis, skipRecord);
+#endif
+
return millis;
}
void OSystem_SDL::delayMillis(uint msecs) {
+#ifdef ENABLE_EVENTRECORDER
if (!g_eventRec.processDelayMillis())
+#endif
SDL_Delay(msecs);
}
@@ -498,11 +516,20 @@ Audio::Mixer *OSystem_SDL::getMixer() {
SdlMixerManager *OSystem_SDL::getMixerManager() {
assert(_mixerManager);
+
+#ifdef ENABLE_EVENTRECORDER
return g_eventRec.getMixerManager();
+#else
+ return _mixerManager;
+#endif
}
Common::TimerManager *OSystem_SDL::getTimerManager() {
+#ifdef ENABLE_EVENTRECORDER
return g_eventRec.getTimerManager();
+#else
+ return _timerManager;
+#endif
}
#ifdef USE_OPENGL
diff --git a/backends/platform/tizen/form.cpp b/backends/platform/tizen/form.cpp
index cce4b99557..5050699ca9 100644
--- a/backends/platform/tizen/form.cpp
+++ b/backends/platform/tizen/form.cpp
@@ -316,16 +316,16 @@ void TizenAppForm::invokeShortcut() {
case kControlMouse:
setButtonShortcut();
break;
-
+
case kEscapeKey:
pushKey(Common::KEYCODE_ESCAPE);
break;
-
+
case kGameMenu:
_buttonState = kLeftButton;
pushKey(Common::KEYCODE_F5);
break;
-
+
case kShowKeypad:
showKeypad();
break;