diff options
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 17 | ||||
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.h | 1 |
2 files changed, 10 insertions, 8 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 32c0fbca6f..c0551de386 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -91,7 +91,7 @@ void OpenGLGraphicsManager::initEventObserver() { bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) { return (f == OSystem::kFeatureAspectRatioCorrection) || - (f == OSystem::kFeatureCursorHasPalette); + (f == OSystem::kFeatureCursorPalette); } void OpenGLGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) { @@ -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 // @@ -1382,7 +1385,7 @@ const char *OpenGLGraphicsManager::getCurrentModeName() { #ifdef USE_OSD void OpenGLGraphicsManager::updateOSD() { // The font we are going to use: - const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kOSDFont); + const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont); if (_osdSurface.w != _osdTexture->getWidth() || _osdSurface.h != _osdTexture->getHeight()) _osdSurface.create(_osdTexture->getWidth(), _osdTexture->getHeight(), _overlayFormat); 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); |