From 7ac3ae108a69587693e0820cde43a63c34a186ec Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 16:23:15 +0200 Subject: BACKEND: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. --- backends/platform/ds/arm9/source/osystem_ds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/platform/ds/arm9/source') diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 576b70dd2a..92f9eb5e9e 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -243,7 +243,7 @@ void OSystem_DS::setCursorPalette(const byte *colors, uint start, uint num) { } bool OSystem_DS::grabRawScreen(Graphics::Surface *surf) { - surf->create(DS::getGameWidth(), DS::getGameHeight(), 1); + surf->create(DS::getGameWidth(), DS::getGameHeight(), Graphics::PixelFormat::createFormatCLUT8()); // Ensure we copy using 16 bit quantities due to limitation of VRAM addressing -- cgit v1.2.3 From 877004dbdd967d2f57d494b1aaa1cb55aae0fd52 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 21:14:19 +0200 Subject: BACKENDS: Adapt various backends code to set up Surface::format correctly. Note that this change is not tested at all (not even compile wise!). --- backends/platform/ds/arm9/source/osystem_ds.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backends/platform/ds/arm9/source') diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 92f9eb5e9e..b22bc437b0 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -757,6 +757,7 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() { _framebuffer.h = DS::getGameHeight(); _framebuffer.pitch = DS::getGameWidth(); _framebuffer.bytesPerPixel = 1; + _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); } else { @@ -782,6 +783,7 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() { _framebuffer.h = height; _framebuffer.pitch = width; _framebuffer.bytesPerPixel = 1; + _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); } -- cgit v1.2.3 From da734a4af024a72ee155bc25d6e45f994de6b060 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 21:27:34 +0200 Subject: ALL/GRAPHICS: Remove Surface::bytesPerPixel. --- backends/platform/ds/arm9/source/osystem_ds.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'backends/platform/ds/arm9/source') diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index b22bc437b0..49818a0034 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -756,7 +756,6 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() { _framebuffer.w = DS::getGameWidth(); _framebuffer.h = DS::getGameHeight(); _framebuffer.pitch = DS::getGameWidth(); - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); } else { @@ -782,7 +781,6 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() { _framebuffer.w = width; _framebuffer.h = height; _framebuffer.pitch = width; - _framebuffer.bytesPerPixel = 1; _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8(); } -- cgit v1.2.3