aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp
diff options
context:
space:
mode:
authorMax Horn2011-06-04 00:14:09 +0200
committerMax Horn2011-06-04 11:55:56 +0200
commitce32745d9c26a0b97dce6a137a46ff2004c7be02 (patch)
treebbf618410aa42cd69b0a140de7fb225a9f769ada /backends/platform/psp
parent6575cd195bef842697ea0b0ec80c3c1aa91f58e5 (diff)
downloadscummvm-rg350-ce32745d9c26a0b97dce6a137a46ff2004c7be02.tar.gz
scummvm-rg350-ce32745d9c26a0b97dce6a137a46ff2004c7be02.tar.bz2
scummvm-rg350-ce32745d9c26a0b97dce6a137a46ff2004c7be02.zip
BACKENDS: Replace OSystem::disableCursorPalette by setFeatureState calls
Diffstat (limited to 'backends/platform/psp')
-rw-r--r--backends/platform/psp/cursor.h1
-rw-r--r--backends/platform/psp/osys_psp.cpp13
-rw-r--r--backends/platform/psp/osys_psp.h1
3 files changed, 8 insertions, 7 deletions
diff --git a/backends/platform/psp/cursor.h b/backends/platform/psp/cursor.h
index 9c24d001fb..f79968243b 100644
--- a/backends/platform/psp/cursor.h
+++ b/backends/platform/psp/cursor.h
@@ -53,6 +53,7 @@ public:
Buffer &buffer() { return _buffer; }
void setCursorPalette(const byte *colors, uint start, uint num);
void enableCursorPalette(bool enable);
+ bool isCursorPaletteEnabled() const { return _useCursorPalette; }
void setLimits(uint32 width, uint32 height);
void setXY(int x, int y);
int32 getX() const { return _x; }
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 2b37460241..eb629376d2 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -114,9 +114,16 @@ bool OSystem_PSP::hasFeature(Feature f) {
}
void OSystem_PSP::setFeatureState(Feature f, bool enable) {
+ if (f == kFeatureCursorPalette) {
+ _pendingUpdate = false;
+ _cursor.enableCursorPalette(enable);
+ }
}
bool OSystem_PSP::getFeatureState(Feature f) {
+ if (f == kFeatureCursorPalette) {
+ return _cursor.isCursorPaletteEnabled();
+ }
return false;
}
@@ -198,12 +205,6 @@ void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) {
_cursor.clearKeyColor(); // Do we need this?
}
-void OSystem_PSP::disableCursorPalette(bool disable) {
- DEBUG_ENTER_FUNC();
- _pendingUpdate = false;
- _cursor.enableCursorPalette(!disable);
-}
-
void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
DEBUG_ENTER_FUNC();
_displayManager.waitUntilRenderFinished();
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index 00eec3da90..8b7c960125 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -99,7 +99,6 @@ protected:
void grabPalette(byte *colors, uint start, uint num);
public:
void setCursorPalette(const byte *colors, uint start, uint num);
- void disableCursorPalette(bool disable);
// Screen related
void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);