diff options
Diffstat (limited to 'backends/platform/android')
-rw-r--r-- | backends/platform/android/android.cpp | 7 | ||||
-rw-r--r-- | backends/platform/android/android.h | 2 | ||||
-rw-r--r-- | backends/platform/android/gfx.cpp | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 453b64b642..5ae0239bab 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -420,6 +420,11 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) { _virtkeybd_on = enable; showVirtualKeyboard(enable); break; + case kFeatureCursorPalette: + _use_mouse_palette = !enable; + if (!enable) + disableCursorPalette(); + break; default: break; } @@ -433,6 +438,8 @@ bool OSystem_Android::getFeatureState(Feature f) { return _ar_correction; case kFeatureVirtualKeyboard: return _virtkeybd_on; + case kFeatureCursorPalette: + return _use_mouse_palette; default: return false; } diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index 752a31a4db..b70fdb7c30 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -237,6 +237,7 @@ private: void clipMouse(Common::Point &p); void scaleMouse(Common::Point &p, int x, int y, bool deductDrawRect = true); void updateEventScale(); + void disableCursorPalette(); protected: // PaletteManager API @@ -272,7 +273,6 @@ public: int cursorTargetScale, const Graphics::PixelFormat *format); virtual void setCursorPalette(const byte *colors, uint start, uint num); - virtual void disableCursorPalette(bool disable); virtual bool pollEvent(Common::Event &event); virtual uint32 getMillis(); diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 89e918a34e..b8a9e74437 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -801,12 +801,10 @@ void OSystem_Android::setCursorPalette(const byte *colors, _use_mouse_palette = true; } -void OSystem_Android::disableCursorPalette(bool disable) { - ENTER("%d", disable); - +void OSystem_Android::disableCursorPalette() { // when disabling the cursor palette, and we're running a clut8 game, // it expects the game palette to be used for the cursor - if (disable && _game_texture->hasPalette()) { + if (_game_texture->hasPalette()) { const byte *src = _game_texture->palette_const(); byte *dst = _mouse_texture_palette->palette(); @@ -825,8 +823,6 @@ void OSystem_Android::disableCursorPalette(bool disable) { byte *p = _mouse_texture_palette->palette() + _mouse_keycolor * 2; WRITE_UINT16(p, READ_UINT16(p) & ~1); } - - _use_mouse_palette = !disable; } #endif |