aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/sdl/sdl-graphics.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-05-11 00:30:02 -0400
committerMatthew Hoops2011-05-11 00:30:28 -0400
commita1d41da096c0bcf502a85919cb1cb1ee471719c5 (patch)
tree8c51419daa486f1d4833757db4715dadab6c3497 /backends/graphics/sdl/sdl-graphics.cpp
parentaccb0c2a5d0c9e7b353cda4b74f511a498ed8073 (diff)
parent33c3e19cea2a08fbf26ecbe940763e8ee1c37d28 (diff)
downloadscummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.gz
scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.bz2
scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: audio/decoders/qdm2.h common/util.cpp engines/groovie/music.cpp engines/groovie/resource.h video/qt_decoder.cpp video/qt_decoder.h
Diffstat (limited to 'backends/graphics/sdl/sdl-graphics.cpp')
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 67b979a830..3ae9597f1c 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -32,6 +32,7 @@
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#include "common/util.h"
#ifdef USE_RGB_COLOR
@@ -1287,9 +1288,9 @@ Graphics::Surface *SdlGraphicsManager::lockScreen() {
_framebuffer.h = _screen->h;
_framebuffer.pitch = _screen->pitch;
#ifdef USE_RGB_COLOR
- _framebuffer.bytesPerPixel = _screenFormat.bytesPerPixel;
+ _framebuffer.format = _screenFormat;
#else
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
#endif
return &_framebuffer;
@@ -2054,7 +2055,11 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) {
dst.w = _osdSurface->w;
dst.h = _osdSurface->h;
dst.pitch = _osdSurface->pitch;
- dst.bytesPerPixel = _osdSurface->format->BytesPerPixel;
+ dst.format = Graphics::PixelFormat(_osdSurface->format->BytesPerPixel,
+ 8 - _osdSurface->format->Rloss, 8 - _osdSurface->format->Gloss,
+ 8 - _osdSurface->format->Bloss, 8 - _osdSurface->format->Aloss,
+ _osdSurface->format->Rshift, _osdSurface->format->Gshift,
+ _osdSurface->format->Bshift, _osdSurface->format->Ashift);
// The font we are going to use:
const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kOSDFont);
@@ -2274,9 +2279,9 @@ bool SdlGraphicsManager::notifyEvent(const Common::Event &event) {
SDL_RWclose(file);
}
if (saveScreenshot(filename))
- printf("Saved '%s'\n", filename);
+ debug("Saved screenshot '%s'", filename);
else
- printf("Could not save screenshot!\n");
+ warning("Could not save screenshot");
return true;
}