summaryrefslogtreecommitdiff
path: root/src/resources/dye/dyepalette_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/dye/dyepalette_unittest.cc')
-rw-r--r--src/resources/dye/dyepalette_unittest.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/resources/dye/dyepalette_unittest.cc b/src/resources/dye/dyepalette_unittest.cc
index 1393070ea..d250acb39 100644
--- a/src/resources/dye/dyepalette_unittest.cc
+++ b/src/resources/dye/dyepalette_unittest.cc
@@ -23,6 +23,9 @@
#include "client.h"
#include "configuration.h"
#include "logger.h"
+#ifdef USE_SDL2
+#include "graphicsmanager.h"
+#endif
#include "resources/resourcemanager.h"
#include "resources/sdlimagehelper.h"
@@ -52,7 +55,13 @@ TEST_CASE("DyePalette tests")
resourceManager->addToSearchPath("../data/test", Append_false);
imageHelper = new SDLImageHelper();
- SDL_SetVideoMode(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
+#ifdef USE_SDL2
+ SDLImageHelper::setRenderer(graphicsManager.createRenderer(
+ graphicsManager.createWindow(640, 480, 0,
+ SDL_WINDOW_SHOWN | SDL_SWSURFACE), SDL_RENDERER_SOFTWARE));
+#else
+ graphicsManager.createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
+#endif
paths.setDefaultValues(getPathsDefaults());
PaletteDB::load();