OSYSTEM: displayMessageOnOSD() now accepts non-ASCII strings
It should now accept strings encoded using the current TranslationManaged charset (e.g. translated text).
This commit is contained in:
parent
197ef8f178
commit
a605c7fd69
3 changed files with 4 additions and 3 deletions
|
@ -1385,7 +1385,7 @@ const char *OpenGLGraphicsManager::getCurrentModeName() {
|
||||||
#ifdef USE_OSD
|
#ifdef USE_OSD
|
||||||
void OpenGLGraphicsManager::updateOSD() {
|
void OpenGLGraphicsManager::updateOSD() {
|
||||||
// The font we are going to use:
|
// 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())
|
if (_osdSurface.w != _osdTexture->getWidth() || _osdSurface.h != _osdTexture->getHeight())
|
||||||
_osdSurface.create(_osdTexture->getWidth(), _osdTexture->getHeight(), _overlayFormat);
|
_osdSurface.create(_osdTexture->getWidth(), _osdTexture->getHeight(), _overlayFormat);
|
||||||
|
|
|
@ -2060,7 +2060,7 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) {
|
||||||
_osdSurface->format->Bshift, _osdSurface->format->Ashift);
|
_osdSurface->format->Bshift, _osdSurface->format->Ashift);
|
||||||
|
|
||||||
// The font we are going to use:
|
// 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
|
// Clear everything with the "transparent" color, i.e. the colorkey
|
||||||
SDL_FillRect(_osdSurface, 0, kOSDColorKey);
|
SDL_FillRect(_osdSurface, 0, kOSDColorKey);
|
||||||
|
|
|
@ -991,7 +991,8 @@ public:
|
||||||
* rectangle over the regular screen content; or in a message box beneath
|
* rectangle over the regular screen content; or in a message box beneath
|
||||||
* it; etc.).
|
* 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
|
* @note There is a default implementation in BaseBackend which uses a
|
||||||
* TimedMessageDialog to display the message. Hence implementing
|
* TimedMessageDialog to display the message. Hence implementing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue