diff options
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 |