diff options
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/mouse_cursor.cpp | 11 | ||||
-rw-r--r-- | engines/titanic/support/mouse_cursor.h | 1 | ||||
-rw-r--r-- | engines/titanic/support/screen_manager.cpp | 6 |
3 files changed, 13 insertions, 5 deletions
diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp index 4dd1ab4366..18591e61ff 100644 --- a/engines/titanic/support/mouse_cursor.cpp +++ b/engines/titanic/support/mouse_cursor.cpp @@ -55,9 +55,10 @@ CMouseCursor::CursorEntry::~CursorEntry() { CMouseCursor::CMouseCursor(CScreenManager *screenManager) : _screenManager(screenManager), _cursorId(CURSOR_HOURGLASS), - _setCursorCount(0), _fieldE4(0), _fieldE8(0) { + _hideCount(0), _setCursorCount(0), _fieldE4(0), _fieldE8(0) { loadCursorImages(); setCursor(CURSOR_ARROW); + CursorMan.showMouse(true); } CMouseCursor::~CMouseCursor() { @@ -87,11 +88,15 @@ void CMouseCursor::loadCursorImages() { } void CMouseCursor::show() { - CursorMan.showMouse(true); + --_hideCount; + assert(_hideCount >= 0); + if (_hideCount == 0) + CursorMan.showMouse(true); } void CMouseCursor::hide() { - CursorMan.showMouse(false); + if (_hideCount++ == 0) + CursorMan.showMouse(false); } void CMouseCursor::setCursor(CursorId cursorId) { diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h index 08de28e29d..8881c9b182 100644 --- a/engines/titanic/support/mouse_cursor.h +++ b/engines/titanic/support/mouse_cursor.h @@ -66,6 +66,7 @@ private: CursorId _cursorId; CursorEntry _cursors[NUM_CURSORS]; uint _setCursorCount; + int _hideCount; int _fieldE4; int _fieldE8; diff --git a/engines/titanic/support/screen_manager.cpp b/engines/titanic/support/screen_manager.cpp index 2e9bbcb6de..6d80428011 100644 --- a/engines/titanic/support/screen_manager.cpp +++ b/engines/titanic/support/screen_manager.cpp @@ -308,11 +308,13 @@ CVideoSurface *OSScreenManager::createSurface(const CResourceKey &key) { } void OSScreenManager::showCursor() { - CScreenManager::_screenManagerPtr->_mouseCursor->show(); + // TODO: Figure out what this method actually is + // CScreenManager::_screenManagerPtr->_mouseCursor->show(); } void OSScreenManager::hideCursor() { - CScreenManager::_screenManagerPtr->_mouseCursor->hide(); + // TODO: Figure out what this method actually is + //CScreenManager::_screenManagerPtr->_mouseCursor->hide(); } void OSScreenManager::destroyFrontAndBackBuffers() { |