aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2
diff options
context:
space:
mode:
authorJohannes Schickel2011-05-01 16:54:45 +0200
committerJohannes Schickel2011-05-01 16:54:45 +0200
commit71bdb86e028db9556611f88b3686ce93312a8131 (patch)
tree3c24233044a8e72bd8ecd73b981f50c725d5d282 /backends/platform/ps2
parent89b63e3adb4692c9659f8b133727ccc1e2af75b4 (diff)
parent8ff527ac4ef4237e63c0802a22eb0f942089e6c4 (diff)
downloadscummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.gz
scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.bz2
scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.zip
Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here: https://github.com/scummvm/scummvm/pull/16 Conflicts: graphics/png.cpp
Diffstat (limited to 'backends/platform/ps2')
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp4
-rw-r--r--backends/platform/ps2/systemps2.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index a460b919fd..e43ea0f376 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -398,7 +398,7 @@ Graphics::Surface *Gs2dScreen::lockScreen() {
_framebuffer.w = _width;
_framebuffer.h = _height;
_framebuffer.pitch = _width; // -not- _pitch; ! It's EE mem, not Tex
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
return &_framebuffer;
}
@@ -441,7 +441,7 @@ void Gs2dScreen::grabPalette(uint8 *pal, uint8 start, uint16 num) {
void Gs2dScreen::grabScreen(Graphics::Surface *surf) {
assert(surf);
WaitSema(g_DmacSema);
- surf->create(_width, _height, 1);
+ surf->create(_width, _height, Graphics::PixelFormat::createFormatCLUT8());
memcpy(surf->pixels, _screenBuf, _width * _height);
SignalSema(g_DmacSema);
}
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 77de74eb5b..e95a026d01 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -727,7 +727,7 @@ void OSystem_PS2::msgPrintf(int millis, const char *format, ...) {
int maxWidth = 0;
Graphics::Surface surf;
- surf.create(300, 200, 1);
+ surf.create(300, 200, Graphics::PixelFormat::createFormatCLUT8());
char *lnSta = resStr;
while (*lnSta && (posY < 180)) {