BACKENDS: Replace OSystem::disableCursorPalette by setFeatureState calls

This commit is contained in:
Max Horn 2011-06-04 00:14:09 +02:00
parent 6575cd195b
commit ce32745d9c
26 changed files with 75 additions and 89 deletions

View file

@ -82,7 +82,6 @@ public:
virtual void warpMouse(int x, int y) = 0; 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 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 setCursorPalette(const byte *colors, uint start, uint num) = 0;
virtual void disableCursorPalette(bool disable) = 0;
virtual void displayMessageOnOSD(const char *msg) {} virtual void displayMessageOnOSD(const char *msg) {}
}; };

View file

@ -79,7 +79,6 @@ public:
void warpMouse(int x, int y) {} 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 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 setCursorPalette(const byte *colors, uint start, uint num) {}
void disableCursorPalette(bool disable) {}
}; };
#endif #endif

View file

@ -105,6 +105,11 @@ void OpenGLGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
_transactionDetails.needRefresh = true; _transactionDetails.needRefresh = true;
break; break;
case OSystem::kFeatureCursorPalette:
_cursorPaletteDisabled = !enable;
_cursorNeedsRedraw = true;
break;
default: default:
break; break;
} }
@ -118,6 +123,9 @@ bool OpenGLGraphicsManager::getFeatureState(OSystem::Feature f) {
case OSystem::kFeatureAspectRatioCorrection: case OSystem::kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection; return _videoMode.aspectRatioCorrection;
case OSystem::kFeatureCursorPalette:
return !_cursorPaletteDisabled;
default: default:
return false; return false;
} }
@ -642,11 +650,6 @@ void OpenGLGraphicsManager::setCursorPalette(const byte *colors, uint start, uin
_cursorNeedsRedraw = true; _cursorNeedsRedraw = true;
} }
void OpenGLGraphicsManager::disableCursorPalette(bool disable) {
_cursorPaletteDisabled = disable;
_cursorNeedsRedraw = true;
}
// //
// Misc // Misc
// //

View file

@ -107,7 +107,6 @@ public:
virtual void warpMouse(int x, int y); 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 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 setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
virtual void displayMessageOnOSD(const char *msg); virtual void displayMessageOnOSD(const char *msg);

View file

@ -235,6 +235,10 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
case OSystem::kFeatureAspectRatioCorrection: case OSystem::kFeatureAspectRatioCorrection:
setAspectRatioCorrection(enable); setAspectRatioCorrection(enable);
break; break;
case OSystem::kFeatureCursorPalette:
_cursorPaletteDisabled = !enable;
blitCursor();
break;
case OSystem::kFeatureIconifyWindow: case OSystem::kFeatureIconifyWindow:
if (enable) if (enable)
SDL_WM_IconifyWindow(); SDL_WM_IconifyWindow();
@ -245,13 +249,15 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
} }
bool SdlGraphicsManager::getFeatureState(OSystem::Feature f) { bool SdlGraphicsManager::getFeatureState(OSystem::Feature f) {
assert (_transactionMode == kTransactionNone); assert(_transactionMode == kTransactionNone);
switch (f) { switch (f) {
case OSystem::kFeatureFullscreenMode: case OSystem::kFeatureFullscreenMode:
return _videoMode.fullscreen; return _videoMode.fullscreen;
case OSystem::kFeatureAspectRatioCorrection: case OSystem::kFeatureAspectRatioCorrection:
return _videoMode.aspectRatioCorrection; return _videoMode.aspectRatioCorrection;
case OSystem::kFeatureCursorPalette:
return !_cursorPaletteDisabled;
default: default:
return false; return false;
} }
@ -1458,11 +1464,6 @@ void SdlGraphicsManager::setCursorPalette(const byte *colors, uint start, uint n
blitCursor(); blitCursor();
} }
void SdlGraphicsManager::disableCursorPalette(bool disable) {
_cursorPaletteDisabled = disable;
blitCursor();
}
void SdlGraphicsManager::setShakePos(int shake_pos) { void SdlGraphicsManager::setShakePos(int shake_pos) {
assert (_transactionMode == kTransactionNone); assert (_transactionMode == kTransactionNone);

View file

@ -132,7 +132,6 @@ public:
virtual void warpMouse(int x, int y); 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 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 setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
#ifdef USE_OSD #ifdef USE_OSD
virtual void displayMessageOnOSD(const char *msg); virtual void displayMessageOnOSD(const char *msg);

View file

@ -222,10 +222,6 @@ void ModularBackend::setCursorPalette(const byte *colors, uint start, uint num)
_graphicsManager->setCursorPalette(colors, start, num); _graphicsManager->setCursorPalette(colors, start, num);
} }
void ModularBackend::disableCursorPalette(bool disable) {
_graphicsManager->disableCursorPalette(disable);
}
Common::TimerManager *ModularBackend::getTimerManager() { Common::TimerManager *ModularBackend::getTimerManager() {
assert(_timerManager); assert(_timerManager);
return _timerManager; return _timerManager;

View file

@ -106,7 +106,6 @@ public:
virtual void warpMouse(int x, int y); 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 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 setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
//@} //@}

View file

@ -420,6 +420,11 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) {
_virtkeybd_on = enable; _virtkeybd_on = enable;
showVirtualKeyboard(enable); showVirtualKeyboard(enable);
break; break;
case kFeatureCursorPalette:
_use_mouse_palette = !enable;
if (!enable)
disableCursorPalette();
break;
default: default:
break; break;
} }
@ -433,6 +438,8 @@ bool OSystem_Android::getFeatureState(Feature f) {
return _ar_correction; return _ar_correction;
case kFeatureVirtualKeyboard: case kFeatureVirtualKeyboard:
return _virtkeybd_on; return _virtkeybd_on;
case kFeatureCursorPalette:
return _use_mouse_palette;
default: default:
return false; return false;
} }

View file

@ -237,6 +237,7 @@ private:
void clipMouse(Common::Point &p); void clipMouse(Common::Point &p);
void scaleMouse(Common::Point &p, int x, int y, bool deductDrawRect = true); void scaleMouse(Common::Point &p, int x, int y, bool deductDrawRect = true);
void updateEventScale(); void updateEventScale();
void disableCursorPalette();
protected: protected:
// PaletteManager API // PaletteManager API
@ -272,7 +273,6 @@ public:
int cursorTargetScale, int cursorTargetScale,
const Graphics::PixelFormat *format); const Graphics::PixelFormat *format);
virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
virtual bool pollEvent(Common::Event &event); virtual bool pollEvent(Common::Event &event);
virtual uint32 getMillis(); virtual uint32 getMillis();

View file

@ -801,12 +801,10 @@ void OSystem_Android::setCursorPalette(const byte *colors,
_use_mouse_palette = true; _use_mouse_palette = true;
} }
void OSystem_Android::disableCursorPalette(bool disable) { void OSystem_Android::disableCursorPalette() {
ENTER("%d", disable);
// when disabling the cursor palette, and we're running a clut8 game, // when disabling the cursor palette, and we're running a clut8 game,
// it expects the game palette to be used for the cursor // 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(); const byte *src = _game_texture->palette_const();
byte *dst = _mouse_texture_palette->palette(); 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; byte *p = _mouse_texture_palette->palette() + _mouse_keycolor * 2;
WRITE_UINT16(p, READ_UINT16(p) & ~1); WRITE_UINT16(p, READ_UINT16(p) & ~1);
} }
_use_mouse_palette = !disable;
} }
#endif #endif

View file

@ -145,9 +145,6 @@ public:
// Replace the specified range of cursor the palette with new colors. // Replace the specified range of cursor the palette with new colors.
void setCursorPalette(const byte *colors, uint start, uint num); void setCursorPalette(const byte *colors, uint start, uint num);
// Disable or enable cursor palette.
void disableCursorPalette(bool disable);
// Shaking is used in SCUMM. Set current shake position. // Shaking is used in SCUMM. Set current shake position.
void setShakePos(int shake_pos); void setShakePos(int shake_pos);

View file

@ -181,6 +181,9 @@ void OSystem_Dreamcast::setFeatureState(Feature f, bool enable)
case kFeatureVirtualKeyboard: case kFeatureVirtualKeyboard:
_softkbd_on = enable; _softkbd_on = enable;
break; break;
case kFeatureCursorPalette:
_enable_cursor_palette = enable;
break;
default: default:
break; break;
} }
@ -193,6 +196,8 @@ bool OSystem_Dreamcast::getFeatureState(Feature f)
return _aspect_stretch; return _aspect_stretch;
case kFeatureVirtualKeyboard: case kFeatureVirtualKeyboard:
return _softkbd_on; return _softkbd_on;
case kFeatureCursorPalette:
return _enable_cursor_palette;
default: default:
return false; return false;
} }

View file

@ -171,11 +171,6 @@ void OSystem_Dreamcast::setCursorPalette(const byte *colors, uint start, uint nu
_enable_cursor_palette = true; _enable_cursor_palette = true;
} }
void OSystem_Dreamcast::disableCursorPalette(bool disable)
{
_enable_cursor_palette = !disable;
}
void OSystem_Dreamcast::grabPalette(byte *colors, uint start, uint num) void OSystem_Dreamcast::grabPalette(byte *colors, uint start, uint num)
{ {
const unsigned short *src = palette + start; const unsigned short *src = palette + start;

View file

@ -128,11 +128,17 @@ bool OSystem_DS::hasFeature(Feature f) {
void OSystem_DS::setFeatureState(Feature f, bool enable) { void OSystem_DS::setFeatureState(Feature f, bool enable) {
if (f == kFeatureVirtualKeyboard) if (f == kFeatureVirtualKeyboard)
DS::setKeyboardIcon(enable); DS::setKeyboardIcon(enable);
else if (f == kFeatureCursorPalette) {
_disableCursorPalette = !enable;
refreshCursor();
}
} }
bool OSystem_DS::getFeatureState(Feature f) { bool OSystem_DS::getFeatureState(Feature f) {
if (f == kFeatureVirtualKeyboard) if (f == kFeatureVirtualKeyboard)
return DS::getKeyboardIcon(); return DS::getKeyboardIcon();
if (f == kFeatureCursorPalette)
return !_disableCursorPalette;
return false; return false;
} }

View file

@ -172,8 +172,6 @@ public:
virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool dis) { _disableCursorPalette = dis; refreshCursor(); }
FilesystemFactory *getFilesystemFactory(); FilesystemFactory *getFilesystemFactory();
void refreshCursor(); void refreshCursor();

View file

@ -189,7 +189,6 @@ public:
virtual void warpMouse(int x, int y); 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, const Graphics::PixelFormat *format); virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format);
virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
virtual bool pollEvent(Common::Event &event); virtual bool pollEvent(Common::Event &event);
virtual uint32 getMillis(); virtual uint32 getMillis();

View file

@ -203,10 +203,19 @@ bool OSystem_N64::hasFeature(Feature f) {
} }
void OSystem_N64::setFeatureState(Feature f, bool enable) { void OSystem_N64::setFeatureState(Feature f, bool enable) {
return; if (f == kFeatureCursorPalette) {
_cursorPaletteDisabled = !enable;
// Rebuild cursor hicolor buffer
rebuildOffscreenMouseBuffer();
_dirtyOffscreen = true;
}
} }
bool OSystem_N64::getFeatureState(Feature f) { bool OSystem_N64::getFeatureState(Feature f) {
if (f == kFeatureCursorPalette)
return !_cursorPaletteDisabled
return false; return false;
} }
@ -437,15 +446,6 @@ void OSystem_N64::setCursorPalette(const byte *colors, uint start, uint num) {
_dirtyOffscreen = true; _dirtyOffscreen = true;
} }
void OSystem_N64::disableCursorPalette(bool disable) {
_cursorPaletteDisabled = disable;
// Rebuild cursor hicolor buffer
rebuildOffscreenMouseBuffer();
_dirtyOffscreen = true;
}
void OSystem_N64::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { void OSystem_N64::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
//Clip the coordinates //Clip the coordinates
if (x < 0) { if (x < 0) {

View file

@ -53,6 +53,7 @@ public:
Buffer &buffer() { return _buffer; } Buffer &buffer() { return _buffer; }
void setCursorPalette(const byte *colors, uint start, uint num); void setCursorPalette(const byte *colors, uint start, uint num);
void enableCursorPalette(bool enable); void enableCursorPalette(bool enable);
bool isCursorPaletteEnabled() const { return _useCursorPalette; }
void setLimits(uint32 width, uint32 height); void setLimits(uint32 width, uint32 height);
void setXY(int x, int y); void setXY(int x, int y);
int32 getX() const { return _x; } int32 getX() const { return _x; }

View file

@ -114,9 +114,16 @@ bool OSystem_PSP::hasFeature(Feature f) {
} }
void OSystem_PSP::setFeatureState(Feature f, bool enable) { void OSystem_PSP::setFeatureState(Feature f, bool enable) {
if (f == kFeatureCursorPalette) {
_pendingUpdate = false;
_cursor.enableCursorPalette(enable);
}
} }
bool OSystem_PSP::getFeatureState(Feature f) { bool OSystem_PSP::getFeatureState(Feature f) {
if (f == kFeatureCursorPalette) {
return _cursor.isCursorPaletteEnabled();
}
return false; return false;
} }
@ -198,12 +205,6 @@ void OSystem_PSP::setCursorPalette(const byte *colors, uint start, uint num) {
_cursor.clearKeyColor(); // Do we need this? _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) { void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {
DEBUG_ENTER_FUNC(); DEBUG_ENTER_FUNC();
_displayManager.waitUntilRenderFinished(); _displayManager.waitUntilRenderFinished();

View file

@ -99,7 +99,6 @@ protected:
void grabPalette(byte *colors, uint start, uint num); void grabPalette(byte *colors, uint start, uint num);
public: public:
void setCursorPalette(const byte *colors, uint start, uint num); void setCursorPalette(const byte *colors, uint start, uint num);
void disableCursorPalette(bool disable);
// Screen related // Screen related
void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);

View file

@ -188,6 +188,13 @@ void OSystem_Wii::setFeatureState(Feature f, bool enable) {
case kFeatureAspectRatioCorrection: case kFeatureAspectRatioCorrection:
_arCorrection = enable; _arCorrection = enable;
break; break;
case kFeatureCursorPalette:
_cursorPaletteDisabled = !enable;
if (_texMouse.palette && !enable) {
memcpy(_texMouse.palette, _cursorPalette, 256 * 2);
_cursorPaletteDirty = true;
}
break;
default: default:
break; break;
} }
@ -199,6 +206,8 @@ bool OSystem_Wii::getFeatureState(Feature f) {
return _fullscreen; return _fullscreen;
case kFeatureAspectRatioCorrection: case kFeatureAspectRatioCorrection:
return _arCorrection; return _arCorrection;
case kFeatureCursorPalette:
return !_cursorPaletteDisabled;
default: default:
return false; return false;
} }

View file

@ -171,7 +171,6 @@ protected:
virtual void grabPalette(byte *colors, uint start, uint num); virtual void grabPalette(byte *colors, uint start, uint num);
public: public:
virtual void setCursorPalette(const byte *colors, uint start, uint num); virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y,
int w, int h); int w, int h);
virtual void updateScreen(); virtual void updateScreen();

View file

@ -394,15 +394,6 @@ void OSystem_Wii::setCursorPalette(const byte *colors, uint start, uint num) {
_cursorPaletteDirty = true; _cursorPaletteDirty = true;
} }
void OSystem_Wii::disableCursorPalette(bool disable) {
_cursorPaletteDisabled = disable;
if (_texMouse.palette && disable) {
memcpy(_texMouse.palette, _cursorPalette, 256 * 2);
_cursorPaletteDirty = true;
}
}
void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y, void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y,
int w, int h) { int w, int h) {
assert(x >= 0 && x < _gameWidth); assert(x >= 0 && x < _gameWidth);

View file

@ -167,14 +167,14 @@ public:
kFeatureVirtualKeyboard, kFeatureVirtualKeyboard,
/** /**
* This flag determines whether or not the cursor can have its own palette. * Backends supporting this feature allow specifying a custom palette
* It is currently used only by some Macintosh versions of Humongous * for the cursor. The custom palette is used if the feature state
* Entertainment games. If the backend doesn't implement this feature then * is set to true by the client code via setFeatureState().
* the engine switches to b/w versions of cursors.
* The GUI also relies on this feature for mouse cursors.
* *
* To enable the cursor palette call "disableCursorPalette" with false. * It is currently used only by some Macintosh versions of Humongous
* @see disableCursorPalette * Entertainment games. If the backend doesn't implement this feature
* then the engine switches to b/w versions of cursors.
* The GUI also relies on this feature for mouse cursors.
*/ */
kFeatureCursorPalette, kFeatureCursorPalette,
@ -800,18 +800,6 @@ public:
*/ */
virtual void setCursorPalette(const byte *colors, uint start, uint num) {} virtual void setCursorPalette(const byte *colors, uint start, uint num) {}
/**
* Disable or enable cursor palette.
*
* Backends which implement it should have kFeatureCursorPalette flag set
*
* @param disable True to disable, false to enable.
*
* @see setPalette
* @see kFeatureCursorPalette
*/
virtual void disableCursorPalette(bool disable) {}
//@} //@}

View file

@ -154,7 +154,7 @@ void CursorManager::disableCursorPalette(bool disable) {
Palette *pal = _cursorPaletteStack.top(); Palette *pal = _cursorPaletteStack.top();
pal->_disabled = disable; pal->_disabled = disable;
g_system->disableCursorPalette(disable); g_system->setFeatureState(OSystem::kFeatureCursorPalette, !disable);
} }
void CursorManager::pushCursorPalette(const byte *colors, uint start, uint num) { void CursorManager::pushCursorPalette(const byte *colors, uint start, uint num) {
@ -167,7 +167,7 @@ void CursorManager::pushCursorPalette(const byte *colors, uint start, uint num)
if (num) if (num)
g_system->setCursorPalette(colors, start, num); g_system->setCursorPalette(colors, start, num);
else else
g_system->disableCursorPalette(true); g_system->setFeatureState(OSystem::kFeatureCursorPalette, false);
} }
void CursorManager::popCursorPalette() { void CursorManager::popCursorPalette() {
@ -181,7 +181,7 @@ void CursorManager::popCursorPalette() {
delete pal; delete pal;
if (_cursorPaletteStack.empty()) { if (_cursorPaletteStack.empty()) {
g_system->disableCursorPalette(true); g_system->setFeatureState(OSystem::kFeatureCursorPalette, false);
return; return;
} }
@ -190,7 +190,7 @@ void CursorManager::popCursorPalette() {
if (pal->_num && !pal->_disabled) if (pal->_num && !pal->_disabled)
g_system->setCursorPalette(pal->_data, pal->_start, pal->_num); g_system->setCursorPalette(pal->_data, pal->_start, pal->_num);
else else
g_system->disableCursorPalette(true); g_system->setFeatureState(OSystem::kFeatureCursorPalette, false);
} }
void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint num) { void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint num) {
@ -219,7 +219,7 @@ void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint nu
memcpy(pal->_data, colors, size); memcpy(pal->_data, colors, size);
g_system->setCursorPalette(pal->_data, pal->_start, pal->_num); g_system->setCursorPalette(pal->_data, pal->_start, pal->_num);
} else { } else {
g_system->disableCursorPalette(true); g_system->setFeatureState(OSystem::kFeatureCursorPalette, false);
} }
} }