aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeNew.cpp5
-rw-r--r--gui/newgui.cpp5
2 files changed, 7 insertions, 3 deletions
diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp
index b08dded3ce..0ff6b45fa4 100644
--- a/gui/ThemeNew.cpp
+++ b/gui/ThemeNew.cpp
@@ -27,6 +27,7 @@
#include "graphics/imageman.h"
#include "graphics/imagedec.h"
#include "graphics/colormasks.h"
+#include "graphics/paletteman.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -383,6 +384,7 @@ void ThemeNew::enable() {
void ThemeNew::disable() {
_system->disableCursorPalette(true);
_system->hideOverlay();
+ PaletteMan.popCursorPalette();
_enabled = false;
}
@@ -1546,9 +1548,8 @@ OverlayColor ThemeNew::calcDimColor(OverlayColor col) {
#pragma mark -
void ThemeNew::setUpCursor() {
- _system->setCursorPalette(_cursorPal, 0, MAX_CURS_COLORS);
+ PaletteMan.pushCursorPalette(_cursorPal, 0, MAX_CURS_COLORS);
_system->setMouseCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale);
- _system->disableCursorPalette(false);
}
void ThemeNew::createCursor() {
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index edd91e9f39..db45d94e3c 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -22,6 +22,7 @@
#include "common/stdafx.h"
#include "common/system.h"
#include "common/util.h"
+#include "graphics/paletteman.h"
#include "gui/newgui.h"
#include "gui/dialog.h"
#include "gui/eval.h"
@@ -154,7 +155,7 @@ void NewGui::runLoop() {
87, 87, 87, 0
};
- _system->setCursorPalette(palette, 0, 4);
+ PaletteMan.pushCursorPalette(palette, 0, 4);
}
while (!_dialogStack.empty() && activeDialog == _dialogStack.top()) {
@@ -272,6 +273,8 @@ void NewGui::runLoop() {
}
_theme->closeDialog();
+ if (useStandardCurs)
+ PaletteMan.popCursorPalette();
if (didSaveState) {
restoreState();