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/opengl/opengl-graphics.cpp | 2 +- backends/graphics/sdl/sdl-graphics.cpp | 2 +- common/system.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 66b1651f81..c0551de386 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -1385,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::kGUIFont); + 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/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); diff --git a/common/system.h b/common/system.h index f206f4dccc..780e5fcc7d 100644 --- a/common/system.h +++ b/common/system.h @@ -991,7 +991,8 @@ public: * rectangle over the regular screen content; or in a message box beneath * it; etc.). * - * Currently, only pure ASCII messages can be expected to show correctly. + * The message is expected to be provided in the current TranslationManager + * charset. * * @note There is a default implementation in BaseBackend which uses a * TimedMessageDialog to display the message. Hence implementing -- cgit v1.2.3