diff options
| author | Max Horn | 2002-05-12 19:25:44 +0000 |
|---|---|---|
| committer | Max Horn | 2002-05-12 19:25:44 +0000 |
| commit | cf5518ad6a6671774e41e74f1cf1c1b4a621d0c9 (patch) | |
| tree | 34bcfe16b30e60a34e2873dc6c9726ba2a1de08e /gui.cpp | |
| parent | 4ac64b941d54e819135a9cb79305e2acd60c2ce1 (diff) | |
| download | scummvm-rg350-cf5518ad6a6671774e41e74f1cf1c1b4a621d0c9.tar.gz scummvm-rg350-cf5518ad6a6671774e41e74f1cf1c1b4a621d0c9.tar.bz2 scummvm-rg350-cf5518ad6a6671774e41e74f1cf1c1b4a621d0c9.zip | |
restore old cursor after leaving save dialog (#548614)
svn-id: r4297
Diffstat (limited to 'gui.cpp')
| -rw-r--r-- | gui.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -947,17 +947,19 @@ void Gui::init(Scumm *s) void Gui::loop() { - /* FIXME - _active is a bool, so what was that code meant to do ? */ -#if OLD_WEIRD_CODE - if (_active == 1) { - _active++; -#else - if (_active) { -#endif + if (_active && !_inited) { + _inited = true; draw(0, 200); // was 100 _s->pauseSounds(true); + // Backup old cursor + memcpy(_old_grabbedCursor, _s->_grabbedCursor, sizeof(_old_grabbedCursor)); + _old_cursorWidth = _s->_cursorWidth; + _old_cursorHeight = _s->_cursorHeight; + _old_cursorHotspotX = _s->_cursorHotspotX; + _old_cursorHotspotY = _s->_cursorHotspotY; _old_cursor_mode = _s->_system->show_mouse(true); + _s->_cursorAnimate++; _s->gdi._cursorActive = 1; } @@ -991,10 +993,20 @@ void Gui::close() _s->_fullRedraw = true; _s->_completeScreenRedraw = true; _s->_cursorAnimate--; + + // Restore old cursor + memcpy(_s->_grabbedCursor, _old_grabbedCursor, sizeof(_old_grabbedCursor)); + _s->_cursorWidth = _old_cursorWidth; + _s->_cursorHeight = _old_cursorHeight; + _s->_cursorHotspotX = _old_cursorHotspotX; + _s->_cursorHotspotY = _old_cursorHotspotY; + _s->updateCursor(); + _s->_system->show_mouse(_old_cursor_mode); _s->pauseSounds(false); _active = false; + _inited = false; #ifdef _WIN32_WCE |
