aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sludge/main_loop.cpp6
-rw-r--r--engines/sludge/sludge.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/engines/sludge/main_loop.cpp b/engines/sludge/main_loop.cpp
index a347b640b0..84d6d740c9 100644
--- a/engines/sludge/main_loop.cpp
+++ b/engines/sludge/main_loop.cpp
@@ -24,6 +24,8 @@
#include "common/events.h"
#include "common/keyboard.h"
+#include "engines/util.h"
+
#include "graphics/surface.h"
#include "sludge/allfiles.h"
@@ -253,6 +255,10 @@ int main_loop(const char *filename)
return 0;
}
+ initGraphics(winWidth, winHeight, false, g_sludge->getScreenPixelFormat());
+
+ // Init screen surface
+ renderSurface.create(g_system->getWidth(), g_system->getHeight(), g_system->getScreenFormat());
#if 0
/* Initialize the SDL library */
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
diff --git a/engines/sludge/sludge.cpp b/engines/sludge/sludge.cpp
index c4e3083466..ab1eb868a2 100644
--- a/engines/sludge/sludge.cpp
+++ b/engines/sludge/sludge.cpp
@@ -25,8 +25,6 @@
#include "common/debug-channels.h"
#include "common/error.h"
-#include "engines/util.h"
-
#include "sludge/sludge.h"
#include "sludge/main_loop.h"
@@ -81,7 +79,6 @@ Common::Error SludgeEngine::run() {
// init graphics
_origFormat = new Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
_pixelFormat = new Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
- initGraphics(640, 480, false, _pixelFormat);
// create console
_console = new SludgeConsole(this);