aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/sdl/graphics.cpp18
-rw-r--r--backends/platform/sdl/sdl.h5
2 files changed, 7 insertions, 16 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index d7cabd00cc..f6b4d76418 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -1162,15 +1162,7 @@ void OSystem_SDL::setCursorPalette(const byte *colors, uint start, uint num) {
}
_cursorPaletteDisabled = false;
-#ifdef ENABLE_RGB_COLOR
-}
-
-void OSystem_SDL::setCursorFormat(Graphics::PixelFormat format) {
- assert(format.bytesPerPixel);
- _cursorFormat = format;
-
-#endif
-// blitCursor();
+ blitCursor();
}
@@ -1378,10 +1370,12 @@ 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, Graphics::PixelFormat format) {
+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;
+ if (!format)
+ format = new Graphics::PixelFormat(1,8,8,8,8,0,0,0,0);
+ 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 efe1984446..2048b7f536 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -152,10 +152,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, Graphics::PixelFormat format); // overloaded by CE backend (FIXME)
-#ifdef ENABLE_RGB_COLOR
- virtual void setCursorFormat(Graphics::PixelFormat format);
-#endif
+ 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)
// Set colors of cursor palette
void setCursorPalette(const byte *colors, uint start, uint num);