aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Crozat2011-05-22 21:57:53 +0100
committerThierry Crozat2011-06-06 23:20:10 +0100
commita605c7fd69e7ecb3e63b2ba8eb420e21ec71ce4a (patch)
tree5e9d94188c01d210fc505fb341ad2babb05819d0
parent197ef8f1783bc5eed5c894e46a7c1d6c528db7e1 (diff)
downloadscummvm-rg350-a605c7fd69e7ecb3e63b2ba8eb420e21ec71ce4a.tar.gz
scummvm-rg350-a605c7fd69e7ecb3e63b2ba8eb420e21ec71ce4a.tar.bz2
scummvm-rg350-a605c7fd69e7ecb3e63b2ba8eb420e21ec71ce4a.zip
OSYSTEM: displayMessageOnOSD() now accepts non-ASCII strings
It should now accept strings encoded using the current TranslationManaged charset (e.g. translated text).
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp2
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp2
-rw-r--r--common/system.h3
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