aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-09-13 00:55:46 -0500
committerColin Snover2017-10-15 13:24:20 -0500
commit9e9972a55b6a9e19f8bff37e023d622262e22096 (patch)
tree7bfd9f5b412989f695bbadcc2f0e68b241e09434
parent5d8cf6ba42c71e37530e83bb766b60bf1388a904 (diff)
downloadscummvm-rg350-9e9972a55b6a9e19f8bff37e023d622262e22096.tar.gz
scummvm-rg350-9e9972a55b6a9e19f8bff37e023d622262e22096.tar.bz2
scummvm-rg350-9e9972a55b6a9e19f8bff37e023d622262e22096.zip
GRAPHICS: Send blank cursors to graphics backends
Blank cursors don't mean to continue drawing the previous cursor, they mean that the cursor in the backend needs to be blank.
-rw-r--r--graphics/cursorman.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index 5fcd2a3602..678b074360 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -65,9 +65,7 @@ void CursorManager::pushCursor(const void *buf, uint w, uint h, int hotspotX, in
cur->_visible = isVisible();
_cursorStack.push(cur);
- if (buf) {
- g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, dontScale, format);
- }
+ g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, dontScale, format);
}
void CursorManager::popCursor() {
@@ -80,6 +78,8 @@ 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->_dontScale, &cur->_format);
+ } else {
+ g_system->setMouseCursor(nullptr, 0, 0, 0, 0, 0);
}
g_system->showMouse(isVisible());
@@ -99,6 +99,7 @@ void CursorManager::popAllCursors() {
}
}
+ g_system->setMouseCursor(nullptr, 0, 0, 0, 0, 0);
g_system->showMouse(isVisible());
}