aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/recorderfile.cpp4
-rw-r--r--common/scummsys.h4
-rw-r--r--test/module.mk1
3 files changed, 9 insertions, 0 deletions
diff --git a/common/recorderfile.cpp b/common/recorderfile.cpp
index 71f8272b44..04802aa0c8 100644
--- a/common/recorderfile.cpp
+++ b/common/recorderfile.cpp
@@ -30,6 +30,8 @@
#include "graphics/surface.h"
#include "graphics/scaler.h"
+#ifdef ENABLE_EVENTRECORDER
+
#define RECORD_VERSION 1
namespace Common {
@@ -714,3 +716,5 @@ void PlaybackFile::checkRecordedMD5() {
}
+
+#endif // ENABLE_EVENTRECORDER
diff --git a/common/scummsys.h b/common/scummsys.h
index 5e1069fb46..3513ee2d7d 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -215,6 +215,10 @@
#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/test/module.mk b/test/module.mk
index 11ee6bd200..e591854ace 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -26,6 +26,7 @@ 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)