aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorJody Northup2009-06-24 06:44:30 +0000
committerJody Northup2009-06-24 06:44:30 +0000
commit865129a5630017f05d08e778ba1ef430c23cd55a (patch)
tree302b20f7e4366d8e5b91cffde7420a0f719771ec /backends/platform/sdl
parent4a380dc0d8b1a75fa31e0b4511e03b0782b43f89 (diff)
downloadscummvm-rg350-865129a5630017f05d08e778ba1ef430c23cd55a.tar.gz
scummvm-rg350-865129a5630017f05d08e778ba1ef430c23cd55a.tar.bz2
scummvm-rg350-865129a5630017f05d08e778ba1ef430c23cd55a.zip
made the cursor's pixel format a member of the cursor object, merged ____CursorFormat functions into equivalent ____Cursor functions.
svn-id: r41825
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/graphics.cpp4
-rw-r--r--backends/platform/sdl/sdl.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index b5ec9b9db8..d7cabd00cc 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -1378,8 +1378,10 @@ void OSystem_SDL::warpMouse(int x, int y) {
}
}
-void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale) {
+void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, Graphics::PixelFormat format) {
#ifdef ENABLE_RGB_COLOR
+ if (format.bytesPerPixel <= _screenFormat.bytesPerPixel)
+ _cursorFormat = format;
keycolor &= (1 << (_cursorFormat.bytesPerPixel << 3)) - 1;
#else
keycolor &= 0xFF;
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index db855094cb..7aeebf9264 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -135,7 +135,7 @@ public:
virtual void warpMouse(int x, int y); // overloaded by CE backend (FIXME)
// Set the bitmap that's used when drawing the cursor.
- virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale); // overloaded by CE backend (FIXME)
+ virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, Graphics::PixelFormat format); // overloaded by CE backend (FIXME)
#ifdef ENABLE_RGB_COLOR
virtual void setCursorFormat(Graphics::PixelFormat format);
#endif