aboutsummaryrefslogtreecommitdiff
path: root/graphics/cursorman.cpp
diff options
context:
space:
mode:
authorJody Northup2009-07-04 04:13:10 +0000
committerJody Northup2009-07-04 04:13:10 +0000
commit6ef485f44896ad778d355bc1201f2f143cc9e770 (patch)
tree6e7ff7fc9d922c13f2c1f696656e1bc3a1944303 /graphics/cursorman.cpp
parent855a9587b94343a563f254998009fd3855ee8227 (diff)
downloadscummvm-rg350-6ef485f44896ad778d355bc1201f2f143cc9e770.tar.gz
scummvm-rg350-6ef485f44896ad778d355bc1201f2f143cc9e770.tar.bz2
scummvm-rg350-6ef485f44896ad778d355bc1201f2f143cc9e770.zip
Fixed cursor corruption in non-8bit graphics games when switching back from overlay.
svn-id: r42084
Diffstat (limited to 'graphics/cursorman.cpp')
-rw-r--r--graphics/cursorman.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index 08a0b3bb88..9559b59d4a 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -77,7 +77,7 @@ void CursorManager::popCursor() {
if (!_cursorStack.empty()) {
cur = _cursorStack.top();
- g_system->setMouseCursor(cur->_data, cur->_width, cur->_height, cur->_hotspotX, cur->_hotspotY, cur->_keycolor, cur->_targetScale, cur->_format);
+ g_system->setMouseCursor(cur->_data, cur->_width, cur->_height, cur->_hotspotX, cur->_hotspotY, cur->_keycolor, cur->_targetScale, &cur->_format);
}
g_system->showMouse(isVisible());
@@ -135,7 +135,10 @@ void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX,
cur->_keycolor = keycolor;
cur->_targetScale = targetScale;
#ifdef ENABLE_RGB_COLOR
- cur->_format = format;
+ if (format)
+ cur->_format = *format;
+ else
+ cur->_format = Graphics::PixelFormat::createFormatCLUT8();
#endif
g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, targetScale, format);