BBVS: Fix compilation without translation enabled

A regression from 2a6cbd0
This commit is contained in:
Matthew Hoops 2015-12-21 17:58:09 -05:00
parent d0d1d6e921
commit bb12f77cbf
2 changed files with 7 additions and 0 deletions

View File

@ -118,15 +118,19 @@ BbvsEngine::BbvsEngine(OSystem *syst, const ADGameDescription *gd) :
Engine::syncSoundSettings();
#ifdef USE_TRANSLATION
_oldGUILanguage = TransMan.getCurrentLanguage();
if (gd->flags & GF_GUILANGSWITCH)
TransMan.setLanguage(getLanguageLocale(gd->language));
#endif
}
BbvsEngine::~BbvsEngine() {
#ifdef USE_TRANSLATION
if (TransMan.getCurrentLanguage() != _oldGUILanguage)
TransMan.setLanguage(_oldGUILanguage);
#endif
delete _random;

View File

@ -234,7 +234,10 @@ public:
private:
Graphics::PixelFormat _pixelFormat;
#ifdef USE_TRANSLATION
Common::String _oldGUILanguage;
#endif
public:
Common::RandomSource *_random;