aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryinsimei2017-07-04 23:56:11 +0200
committerEugene Sandulenko2017-07-13 18:27:45 +0200
commit5469aaf8ec48050b517933f69c6b2bcbbc288c0f (patch)
tree396e4c3a0958f9dc51e9f62b3787b7160c146fce
parentd63953d9ce9d37286c9d01eb7b0ab8f15feab475 (diff)
downloadscummvm-rg350-5469aaf8ec48050b517933f69c6b2bcbbc288c0f.tar.gz
scummvm-rg350-5469aaf8ec48050b517933f69c6b2bcbbc288c0f.tar.bz2
scummvm-rg350-5469aaf8ec48050b517933f69c6b2bcbbc288c0f.zip
SLUDGE: move initGraphics after sludge init
-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);