aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sword25/fmv/theora_decoder.cpp2
-rw-r--r--engines/sword25/gfx/graphicengine.cpp6
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp2
-rw-r--r--engines/sword25/gfx/screenshot.cpp2
4 files changed, 7 insertions, 5 deletions
diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp
index e9901c04b0..4f6f52509d 100644
--- a/engines/sword25/fmv/theora_decoder.cpp
+++ b/engines/sword25/fmv/theora_decoder.cpp
@@ -289,7 +289,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
_surface = new Graphics::Surface();
- _surface->create(_theoraInfo.frame_width, _theoraInfo.frame_height, 4);
+ _surface->create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat());
return true;
}
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 502d2d3b2a..8bdf2a4a6e 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -112,8 +112,10 @@ bool GraphicEngine::init(int width, int height, int bitDepth, int backbufferCoun
_screenRect.right = _width;
_screenRect.bottom = _height;
- _backSurface.create(width, height, 4);
- _frameBuffer.create(width, height, 4);
+ const Graphics::PixelFormat format = g_system->getScreenFormat();
+
+ _backSurface.create(width, height, format);
+ _frameBuffer.create(width, height, format);
// Standardmäßig ist Vsync an.
setVsync(true);
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index b740c0ec68..560663896f 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -409,7 +409,7 @@ void RenderedImage::copyDirectly(int posX, int posY) {
*/
Graphics::Surface *RenderedImage::scale(const Graphics::Surface &srcImage, int xSize, int ySize) {
Graphics::Surface *s = new Graphics::Surface();
- s->create(xSize, ySize, srcImage.bytesPerPixel);
+ s->create(xSize, ySize, srcImage.format);
int *horizUsage = scaleLine(xSize, srcImage.w);
int *vertUsage = scaleLine(ySize, srcImage.h);
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index 35e94976eb..e06ccb8051 100644
--- a/engines/sword25/gfx/screenshot.cpp
+++ b/engines/sword25/gfx/screenshot.cpp
@@ -134,7 +134,7 @@ Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data)
// Buffer for the output thumbnail
Graphics::Surface thumbnail;
- thumbnail.create(200, 125, 4);
+ thumbnail.create(200, 125, g_system->getScreenFormat());
// Über das Zielbild iterieren und einen Pixel zur Zeit berechnen.
uint x, y;