aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorJody Northup2009-06-16 09:04:37 +0000
committerJody Northup2009-06-16 09:04:37 +0000
commitcb56169a2770c25ce27256db339353011158998f (patch)
treefe05c7d8a9fa2915918f4995ceae194d1a6f378d /backends/platform/sdl
parentd3283f86fcd6c1a636bf769a3deb5d3afa561b01 (diff)
downloadscummvm-rg350-cb56169a2770c25ce27256db339353011158998f.tar.gz
scummvm-rg350-cb56169a2770c25ce27256db339353011158998f.tar.bz2
scummvm-rg350-cb56169a2770c25ce27256db339353011158998f.zip
Declared getBestFormat in OSystem base class, and implemented in SDL backend.
svn-id: r41580
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/sdl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index b36139f24b..b788022d57 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -88,6 +88,18 @@ public:
// Game screen
virtual Graphics::PixelFormat getScreenFormat() const { return _screenFormat; }
+
+ // Highest supported
+ virtual Graphics::PixelFormat getBestFormat() const {
+ //TODO scale down 16/32 bit based on hardware support
+#ifdef ENABLE_32BIT
+ return Graphics::PixelFormat(Graphics::kFormatRGBA8888);
+#elif defined ENABLE_16BIT
+ return Graphics::PixelFormat(Graphics::kFormatRGB565);
+#else
+ return Graphics::PixelFormat(Graphics::kFormatCLUT8);
+#endif
+ }
#endif
// Set the size of the video bitmap.