diff options
author | Eugene Sandulenko | 2016-07-28 23:05:30 +0300 |
---|---|---|
committer | GitHub | 2016-07-28 23:05:30 +0300 |
commit | d8e7d3cc355827a0a7dc3de4e77fade1ec13a10c (patch) | |
tree | 7d1bf6d6a59d6eec7809796a174afaae8304cb6a | |
parent | 823c2f899b480a1fa494b08e1471142129293779 (diff) | |
parent | f980ef5524897eac047f0d794af3971c7c71a6a3 (diff) | |
download | scummvm-rg350-d8e7d3cc355827a0a7dc3de4e77fade1ec13a10c.tar.gz scummvm-rg350-d8e7d3cc355827a0a7dc3de4e77fade1ec13a10c.tar.bz2 scummvm-rg350-d8e7d3cc355827a0a7dc3de4e77fade1ec13a10c.zip |
Merge pull request #794 from bgK/fix-tests-event-recorder
COMMON: Fix tests when building with the event recorder
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 8 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 1 | ||||
-rw-r--r-- | common/recorderfile.cpp | 4 | ||||
-rw-r--r-- | common/scummsys.h | 4 | ||||
-rw-r--r-- | common/system.cpp | 7 | ||||
-rw-r--r-- | common/system.h | 2 | ||||
-rw-r--r-- | test/module.mk | 1 |
8 files changed, 11 insertions, 18 deletions
diff --git a/.travis.yml b/.travis.yml index 9965f168b8..0c88ec8f24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ os: - linux script: - - ./configure --enable-all-engines --disable-eventrecorder + - ./configure --enable-all-engines - make -j 2 - make test - make devtools diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index c55753194b..dca6891fef 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -492,6 +492,14 @@ AudioCDManager *OSystem_SDL::createAudioCDManager() { #endif } +Common::SaveFileManager *OSystem_SDL::getSavefileManager() { +#ifdef ENABLE_EVENTRECORDER + return g_eventRec.getSaveManager(_savefileManager); +#else + return _savefileManager; +#endif +} + #ifdef USE_OPENGL const OSystem::GraphicsMode *OSystem_SDL::getSupportedGraphicsModes() const { diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index c93c8308a7..1fe670c5c3 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -76,6 +76,7 @@ public: virtual void getTimeAndDate(TimeDate &td) const; virtual Audio::Mixer *getMixer(); virtual Common::TimerManager *getTimerManager(); + virtual Common::SaveFileManager *getSavefileManager(); protected: bool _inited; diff --git a/common/recorderfile.cpp b/common/recorderfile.cpp index 04802aa0c8..71f8272b44 100644 --- a/common/recorderfile.cpp +++ b/common/recorderfile.cpp @@ -30,8 +30,6 @@ #include "graphics/surface.h" #include "graphics/scaler.h" -#ifdef ENABLE_EVENTRECORDER - #define RECORD_VERSION 1 namespace Common { @@ -716,5 +714,3 @@ void PlaybackFile::checkRecordedMD5() { } - -#endif // ENABLE_EVENTRECORDER diff --git a/common/scummsys.h b/common/scummsys.h index 3513ee2d7d..5e1069fb46 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -215,10 +215,6 @@ #include "config.h" #endif -// Now we need to adjust some settings when running tests -#ifdef COMPILING_TESTS -#undef ENABLE_EVENTRECORDER -#endif // In the following we configure various targets, in particular those // which can't use our "configure" tool and hence don't use config.h. diff --git a/common/system.cpp b/common/system.cpp index 53f28cafa1..131a7d2580 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -30,9 +30,6 @@ #include "common/taskbar.h" #include "common/updates.h" #include "common/textconsole.h" -#ifdef ENABLE_EVENTRECORDER -#include "gui/EventRecorder.h" -#endif #include "backends/audiocd/default/default-audiocd.h" #include "backends/fs/fs-factory.h" @@ -161,9 +158,5 @@ Common::TimerManager *OSystem::getTimerManager() { } Common::SaveFileManager *OSystem::getSavefileManager() { -#ifdef ENABLE_EVENTRECORDER - return g_eventRec.getSaveManager(_savefileManager); -#else return _savefileManager; -#endif } diff --git a/common/system.h b/common/system.h index 8896554f76..6d185d3075 100644 --- a/common/system.h +++ b/common/system.h @@ -1090,7 +1090,7 @@ public: * and other modifiable persistent game data. For more information, * refer to the SaveFileManager documentation. */ - Common::SaveFileManager *getSavefileManager(); + virtual Common::SaveFileManager *getSavefileManager(); #if defined(USE_TASKBAR) /** diff --git a/test/module.mk b/test/module.mk index e591854ace..11ee6bd200 100644 --- a/test/module.mk +++ b/test/module.mk @@ -26,7 +26,6 @@ endif #TEST_LDFLAGS += -L/usr/X11R6/lib -lX11 -test: CXXFLAGS += -DCOMPILING_TESTS=1 test: test/runner ./test/runner test/runner: test/runner.cpp $(TEST_LIBS) |