aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-06-10 15:20:52 +0000
committerJohannes Schickel2009-06-10 15:20:52 +0000
commitc0ba9d11589edd9183e068ae94ad016a365c4f34 (patch)
tree836486630fea5246f36bb67595ae77859f67f443
parentbe42f800a448798819b5ccedbb0a2aca3133730f (diff)
downloadscummvm-rg350-c0ba9d11589edd9183e068ae94ad016a365c4f34.tar.gz
scummvm-rg350-c0ba9d11589edd9183e068ae94ad016a365c4f34.tar.bz2
scummvm-rg350-c0ba9d11589edd9183e068ae94ad016a365c4f34.zip
Add a convenience wrapper to CursorMan for checking whether cursor palettes are supported.
svn-id: r41432
-rw-r--r--graphics/cursorman.cpp4
-rw-r--r--graphics/cursorman.h11
2 files changed, 15 insertions, 0 deletions
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index 462897ac57..2e71b548bc 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -129,6 +129,10 @@ void CursorManager::replaceCursor(const byte *buf, uint w, uint h, int hotspotX,
g_system->setMouseCursor(cur->_data, w, h, hotspotX, hotspotY, keycolor, targetScale);
}
+bool CursorManager::supportsCursorPalettes() {
+ return g_system->hasFeature(OSystem::kFeatureCursorHasPalette);
+}
+
void CursorManager::disableCursorPalette(bool disable) {
if (!g_system->hasFeature(OSystem::kFeatureCursorHasPalette))
return;
diff --git a/graphics/cursorman.h b/graphics/cursorman.h
index bc38466eda..4cbd5bea12 100644
--- a/graphics/cursorman.h
+++ b/graphics/cursorman.h
@@ -88,6 +88,17 @@ public:
void popAllCursors();
/**
+ * Test whether cursor palettes are supported.
+ *
+ * This is just an convenience wrapper for checking for
+ * OSystem::kFeatureCursorHasPalette to be supported by OSystem.
+ *
+ * @see OSystem::kFeatureCursorHasPalette
+ * @see OSystem::hasFeature
+ */
+ bool supportsCursorPalettes();
+
+ /**
* Enable/Disable the current cursor palette.
*
* @param disable