From 91b889e2d36baf8a8e1f56f05f4d063e5ae79849 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 3 Jun 2011 23:30:55 +0200 Subject: COMMON: Rename kFeatureCursorHasPalette -> kFeatureCursorPalette --- backends/graphics/sdl/sdl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/graphics/sdl/sdl-graphics.cpp') diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 7a5b777032..8bc59a9200 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -223,7 +223,7 @@ bool SdlGraphicsManager::hasFeature(OSystem::Feature f) { return (f == OSystem::kFeatureFullscreenMode) || (f == OSystem::kFeatureAspectRatioCorrection) || - (f == OSystem::kFeatureCursorHasPalette) || + (f == OSystem::kFeatureCursorPalette) || (f == OSystem::kFeatureIconifyWindow); } -- cgit v1.2.3 From ce32745d9c26a0b97dce6a137a46ff2004c7be02 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 4 Jun 2011 00:14:09 +0200 Subject: BACKENDS: Replace OSystem::disableCursorPalette by setFeatureState calls --- backends/graphics/sdl/sdl-graphics.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'backends/graphics/sdl/sdl-graphics.cpp') diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 8bc59a9200..ab09c3e44e 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -235,6 +235,10 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) { case OSystem::kFeatureAspectRatioCorrection: setAspectRatioCorrection(enable); break; + case OSystem::kFeatureCursorPalette: + _cursorPaletteDisabled = !enable; + blitCursor(); + break; case OSystem::kFeatureIconifyWindow: if (enable) SDL_WM_IconifyWindow(); @@ -245,13 +249,15 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) { } bool SdlGraphicsManager::getFeatureState(OSystem::Feature f) { - assert (_transactionMode == kTransactionNone); + assert(_transactionMode == kTransactionNone); switch (f) { case OSystem::kFeatureFullscreenMode: return _videoMode.fullscreen; case OSystem::kFeatureAspectRatioCorrection: return _videoMode.aspectRatioCorrection; + case OSystem::kFeatureCursorPalette: + return !_cursorPaletteDisabled; default: return false; } @@ -1458,11 +1464,6 @@ void SdlGraphicsManager::setCursorPalette(const byte *colors, uint start, uint n blitCursor(); } -void SdlGraphicsManager::disableCursorPalette(bool disable) { - _cursorPaletteDisabled = disable; - blitCursor(); -} - void SdlGraphicsManager::setShakePos(int shake_pos) { assert (_transactionMode == kTransactionNone); -- cgit v1.2.3 From 592cca5402f9162fc70b48f40b95faec44341bd0 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 22 May 2011 15:15:15 +0100 Subject: GRAPHICS: Get rid of kSODFont (ScummFont) OSD is now using the kGUIFont instead. The main advantage is that the kGUIFont can be used for translated text while only ASCII characters were present in ScummFont. --- backends/graphics/sdl/sdl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/graphics/sdl/sdl-graphics.cpp') diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index ab09c3e44e..7f0990dbca 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -2060,7 +2060,7 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) { _osdSurface->format->Bshift, _osdSurface->format->Ashift); // The font we are going to use: - const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kOSDFont); + const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont); // Clear everything with the "transparent" color, i.e. the colorkey SDL_FillRect(_osdSurface, 0, kOSDColorKey); -- cgit v1.2.3 From a605c7fd69e7ecb3e63b2ba8eb420e21ec71ce4a Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 22 May 2011 21:57:53 +0100 Subject: OSYSTEM: displayMessageOnOSD() now accepts non-ASCII strings It should now accept strings encoded using the current TranslationManaged charset (e.g. translated text). --- backends/graphics/sdl/sdl-graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/graphics/sdl/sdl-graphics.cpp') diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 7f0990dbca..5c166bd8b1 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -2060,7 +2060,7 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) { _osdSurface->format->Bshift, _osdSurface->format->Ashift); // The font we are going to use: - const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kGUIFont); + const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kLocalizedFont); // Clear everything with the "transparent" color, i.e. the colorkey SDL_FillRect(_osdSurface, 0, kOSDColorKey); -- cgit v1.2.3 From 014145f240cc514ddf284f5a22b675ee775f4a9c Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 6 Jun 2011 20:08:28 +0100 Subject: I18N: Make some OSD messages translatable --- backends/graphics/sdl/sdl-graphics.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'backends/graphics/sdl/sdl-graphics.cpp') diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 5c166bd8b1..9063f55744 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -2133,12 +2133,14 @@ bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) { #ifdef USE_OSD char buffer[128]; if (_videoMode.aspectRatioCorrection) - sprintf(buffer, "Enabled aspect ratio correction\n%d x %d -> %d x %d", + sprintf(buffer, "%s\n%d x %d -> %d x %d", + _("Enabled aspect ratio correction"), _videoMode.screenWidth, _videoMode.screenHeight, _hwscreen->w, _hwscreen->h ); else - sprintf(buffer, "Disabled aspect ratio correction\n%d x %d -> %d x %d", + sprintf(buffer, "%s\n%d x %d -> %d x %d", + _("Disabled aspect ratio correction"), _videoMode.screenWidth, _videoMode.screenHeight, _hwscreen->w, _hwscreen->h ); @@ -2192,7 +2194,8 @@ bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) { } if (newScalerName) { char buffer[128]; - sprintf(buffer, "Active graphics filter: %s\n%d x %d -> %d x %d", + sprintf(buffer, "%s %s\n%d x %d -> %d x %d", + _("Active graphics filter:"), newScalerName, _videoMode.screenWidth, _videoMode.screenHeight, _hwscreen->w, _hwscreen->h @@ -2246,9 +2249,9 @@ void SdlGraphicsManager::toggleFullScreen() { endGFXTransaction(); #ifdef USE_OSD if (_videoMode.fullscreen) - displayMessageOnOSD("Fullscreen mode"); + displayMessageOnOSD(_("Fullscreen mode")); else - displayMessageOnOSD("Windowed mode"); + displayMessageOnOSD(_("Windowed mode")); #endif } -- cgit v1.2.3