GUI: Convert the cursor bitmap to the overlay format
This commit is contained in:
parent
824de0bc8a
commit
26dc725ed2
1 changed files with 4 additions and 4 deletions
|
@ -1534,16 +1534,16 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int
|
||||||
_cursorHeight = cursor->h;
|
_cursorHeight = cursor->h;
|
||||||
|
|
||||||
#ifdef USE_RGB_COLOR
|
#ifdef USE_RGB_COLOR
|
||||||
_cursorFormat = cursor->format;
|
_cursorFormat = _overlayFormat;
|
||||||
_cursorTransparent = _cursorFormat.RGBToColor(0xFF, 0, 0xFF);
|
_cursorTransparent = _cursorFormat.RGBToColor(0xFF, 0, 0xFF);
|
||||||
|
|
||||||
// Allocate a new buffer for the cursor
|
// Allocate a new buffer for the cursor
|
||||||
delete[] _cursor;
|
delete[] _cursor;
|
||||||
_cursor = new byte[_cursorWidth * _cursorHeight * _cursorFormat.bytesPerPixel];
|
_cursor = new byte[_cursorWidth * _cursorHeight * _cursorFormat.bytesPerPixel];
|
||||||
assert(_cursor);
|
assert(_cursor);
|
||||||
Graphics::copyBlit(_cursor, (const byte *)cursor->getPixels(),
|
Graphics::crossBlit(_cursor, (const byte *)cursor->getPixels(),
|
||||||
_cursorWidth * _cursorFormat.bytesPerPixel, cursor->pitch,
|
_cursorWidth * _cursorFormat.bytesPerPixel, cursor->pitch,
|
||||||
_cursorWidth, _cursorHeight, _cursorFormat.bytesPerPixel);
|
_cursorWidth, _cursorHeight, _cursorFormat, cursor->format);
|
||||||
|
|
||||||
_useCursor = true;
|
_useCursor = true;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue