aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/graphics.h1
-rw-r--r--backends/graphics/null/null-graphics.h1
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp13
-rw-r--r--backends/graphics/opengl/opengl-graphics.h1
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp13
-rw-r--r--backends/graphics/sdl/sdl-graphics.h1
6 files changed, 15 insertions, 15 deletions
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index 4e681eb155..20924ed581 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -82,7 +82,6 @@ public:
virtual void warpMouse(int x, int y) = 0;
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL) = 0;
virtual void setCursorPalette(const byte *colors, uint start, uint num) = 0;
- virtual void disableCursorPalette(bool disable) = 0;
virtual void displayMessageOnOSD(const char *msg) {}
};
diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h
index 673d59814e..28b24f6aca 100644
--- a/backends/graphics/null/null-graphics.h
+++ b/backends/graphics/null/null-graphics.h
@@ -79,7 +79,6 @@ public:
void warpMouse(int x, int y) {}
void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL) {}
void setCursorPalette(const byte *colors, uint start, uint num) {}
- void disableCursorPalette(bool disable) {}
};
#endif
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 03f959381b..c1bbdb2724 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -105,6 +105,11 @@ void OpenGLGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
_transactionDetails.needRefresh = true;
break;
+ case OSystem::kFeatureCursorPalette:
+ _cursorPaletteDisabled = !enable;
+ _cursorNeedsRedraw = true;
+ break;
+
default:
break;
}
@@ -118,6 +123,9 @@ bool OpenGLGraphicsManager::getFeatureState(OSystem::Feature f) {
case OSystem::kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection;
+ case OSystem::kFeatureCursorPalette:
+ return !_cursorPaletteDisabled;
+
default:
return false;
}
@@ -642,11 +650,6 @@ void OpenGLGraphicsManager::setCursorPalette(const byte *colors, uint start, uin
_cursorNeedsRedraw = true;
}
-void OpenGLGraphicsManager::disableCursorPalette(bool disable) {
- _cursorPaletteDisabled = disable;
- _cursorNeedsRedraw = true;
-}
-
//
// Misc
//
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index daba7748bc..463715aad8 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -107,7 +107,6 @@ public:
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL);
virtual void setCursorPalette(const byte *colors, uint start, uint num);
- virtual void disableCursorPalette(bool disable);
virtual void displayMessageOnOSD(const char *msg);
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 8bc59a9200..ab09c3e44e 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -235,6 +235,10 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
case OSystem::kFeatureAspectRatioCorrection:
setAspectRatioCorrection(enable);
break;
+ case OSystem::kFeatureCursorPalette:
+ _cursorPaletteDisabled = !enable;
+ blitCursor();
+ break;
case OSystem::kFeatureIconifyWindow:
if (enable)
SDL_WM_IconifyWindow();
@@ -245,13 +249,15 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
}
bool SdlGraphicsManager::getFeatureState(OSystem::Feature f) {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
switch (f) {
case OSystem::kFeatureFullscreenMode:
return _videoMode.fullscreen;
case OSystem::kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection;
+ case OSystem::kFeatureCursorPalette:
+ return !_cursorPaletteDisabled;
default:
return false;
}
@@ -1458,11 +1464,6 @@ void SdlGraphicsManager::setCursorPalette(const byte *colors, uint start, uint n
blitCursor();
}
-void SdlGraphicsManager::disableCursorPalette(bool disable) {
- _cursorPaletteDisabled = disable;
- blitCursor();
-}
-
void SdlGraphicsManager::setShakePos(int shake_pos) {
assert (_transactionMode == kTransactionNone);
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 86e52a0bf6..9627ab23a3 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -132,7 +132,6 @@ public:
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL);
virtual void setCursorPalette(const byte *colors, uint start, uint num);
- virtual void disableCursorPalette(bool disable);
#ifdef USE_OSD
virtual void displayMessageOnOSD(const char *msg);