diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/graphics.cpp | 11 | ||||
-rw-r--r-- | engines/agi/graphics.h | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp index 1b8223b051..378080fcc9 100644 --- a/engines/agi/graphics.cpp +++ b/engines/agi/graphics.cpp @@ -536,6 +536,7 @@ GfxMgr::GfxMgr(AgiBase *vm) : _vm(vm) { _shakeH = NULL; _shakeV = NULL; _agipalFileNum = 0; + _currentCursorPalette = 0; // cursor palette not set } @@ -1007,9 +1008,15 @@ void GfxMgr::setCursor(bool amigaStyleCursor) { void GfxMgr::setCursorPalette(bool amigaStyleCursor) { if (!amigaStyleCursor) { - CursorMan.replaceCursorPalette(sciMouseCursorPalette, 1, ARRAYSIZE(sciMouseCursorPalette) / 4); + if (_currentCursorPalette != 1) { + CursorMan.replaceCursorPalette(sciMouseCursorPalette, 1, ARRAYSIZE(sciMouseCursorPalette) / 4); + _currentCursorPalette = 1; + } } else { // amigaStyleCursor - CursorMan.replaceCursorPalette(amigaMouseCursorPalette, 1, ARRAYSIZE(amigaMouseCursorPalette) / 4); + if (_currentCursorPalette != 2) { + CursorMan.replaceCursorPalette(amigaMouseCursorPalette, 1, ARRAYSIZE(amigaMouseCursorPalette) / 4); + _currentCursorPalette = 2; + } } } diff --git a/engines/agi/graphics.h b/engines/agi/graphics.h index 9981c0d76a..6dfe168362 100644 --- a/engines/agi/graphics.h +++ b/engines/agi/graphics.h @@ -50,6 +50,7 @@ private: uint8 _agipalPalette[16 * 3]; int _agipalFileNum; + int _currentCursorPalette; // 0 - palette not set, 1 - PC, 2 - Amiga private: void rawDrawButton(int x, int y, const char *s, int fgcolor, int bgcolor, bool border, int textOffset); |