summaryrefslogtreecommitdiff
path: root/src/gui/windowmanager_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windowmanager_unittest.cc')
-rw-r--r--src/gui/windowmanager_unittest.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/windowmanager_unittest.cc b/src/gui/windowmanager_unittest.cc
index 9f8e51ffe..7d18c4b9a 100644
--- a/src/gui/windowmanager_unittest.cc
+++ b/src/gui/windowmanager_unittest.cc
@@ -20,6 +20,9 @@
#include "catch.hpp"
#include "client.h"
+#ifdef USE_SDL2
+#include "graphicsmanager.h"
+#endif
#include "settings.h"
#include "gui/gui.h"
@@ -78,7 +81,13 @@ TEST_CASE("Windows tests", "windowmanager")
gui = new Gui();
gui->postInit(mainGraphics);
- 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
SECTION("setupWindow")
{