diff options
author | Einar Johan Trøan Sømåen | 2012-06-01 17:49:29 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-02 13:07:37 +0200 |
commit | 96a8874a9280ff9d428965fedb1360008afea69a (patch) | |
tree | e5ffbcd79991ebfffda41d07b584a5306761d96f | |
parent | 79f86732b8dd17264768b32ceefcb79b1ee422b5 (diff) | |
download | scummvm-rg350-96a8874a9280ff9d428965fedb1360008afea69a.tar.gz scummvm-rg350-96a8874a9280ff9d428965fedb1360008afea69a.tar.bz2 scummvm-rg350-96a8874a9280ff9d428965fedb1360008afea69a.zip |
WINTERMUTE: Use the resolution asked for by the engines.
-rw-r--r-- | engines/wintermute/BRenderSDL.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/wintermute/BRenderSDL.cpp b/engines/wintermute/BRenderSDL.cpp index 34f0a57250..9702fc140e 100644 --- a/engines/wintermute/BRenderSDL.cpp +++ b/engines/wintermute/BRenderSDL.cpp @@ -137,6 +137,15 @@ HRESULT CBRenderSDL::InitRenderer(int width, int height, bool windowed) { //_windowed = Game->_registry->ReadBool("Video", "Windowed", true);
// if (!windowed) flags |= SDL_WINDOW_FULLSCREEN;
+ Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
+ g_system->beginGFXTransaction();
+ g_system->initSize(_width, _height, &format);
+ OSystem::TransactionError gfxError = g_system->endGFXTransaction();
+
+ if (gfxError != OSystem::kTransactionSuccess) {
+ warning("Couldn't setup GFX-backend for %dx%dx%d", _width, _height, format.bytesPerPixel * 8);
+ return E_FAIL;
+ }
#if 0
_win = SDL_CreateWindow("WME Lite",
SDL_WINDOWPOS_UNDEFINED,
|