Skip to content

Commit

Permalink
SCUMM: Fix cursor after closing Mac dialog window
Browse files Browse the repository at this point in the history
  • Loading branch information
Torbjörn Andersson committed Nov 9, 2023
1 parent 177e092 commit 38235b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions engines/scumm/gfx_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1561,8 +1561,8 @@ MacGui::MacDialogWindow::~MacDialogWindow() {
if (!CursorMan.isVisible())
CursorMan.showMouse(true);

CursorMan.showMouse(true);
_gui->_windowManager->replaceCursor(Graphics::MacGUIConstants::kMacCursorArrow);
CursorMan.showMouse(_cursorWasVisible);
_gui->_windowManager->popCursor();

copyToScreen(_backup);
_backup->free();
Expand All @@ -1586,6 +1586,8 @@ void MacGui::MacDialogWindow::show() {
_visible = true;
copyToScreen();
_dirtyRects.clear();
_gui->_windowManager->pushCursor(Graphics::MacGUIConstants::kMacCursorArrow);
_cursorWasVisible = CursorMan.showMouse(true);
}

void MacGui::MacDialogWindow::setFocusedWidget(int x, int y) {
Expand Down
1 change: 1 addition & 0 deletions engines/scumm/gfx_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ class MacGui {

Graphics::Surface *_beamCursor = nullptr;
Common::Point _beamCursorPos;
bool _cursorWasVisible = false;
bool _beamCursorVisible = false;
int _beamCursorHotspotX = 3;
int _beamCursorHotspotY = 4;
Expand Down

0 comments on commit 38235b8

Please sign in to comment.