diff options
author | Jody Northup | 2009-06-24 06:44:30 +0000 |
---|---|---|
committer | Jody Northup | 2009-06-24 06:44:30 +0000 |
commit | 865129a5630017f05d08e778ba1ef430c23cd55a (patch) | |
tree | 302b20f7e4366d8e5b91cffde7420a0f719771ec /backends | |
parent | 4a380dc0d8b1a75fa31e0b4511e03b0782b43f89 (diff) | |
download | scummvm-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')
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 4 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 2 |
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 |