From 12d983eaf41bd8353849ee8776fc2bbc59808870 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 31 Jan 2010 22:14:35 +0000 Subject: Make EngineState::getLanguage() check from the resource manager as to what language it has loaded before checking from what ScummVM has set and make kDoAudio use EngineState::getLanguage() svn-id: r47782 --- engines/sci/engine/ksound.cpp | 2 +- engines/sci/engine/state.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index 584e58c0be..5352774812 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -149,7 +149,7 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) { if (language != -1) s->resMan->setAudioLanguage(language); - return make_reg(0, s->resMan->getAudioLanguage()); + return make_reg(0, s->getLanguage()); } break; case kSciAudioCD: diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index a773894254..003043b8ca 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -153,7 +153,11 @@ Common::String EngineState::getLanguageString(const char *str, kLanguage lang) c } kLanguage EngineState::getLanguage() { - kLanguage lang = K_LANG_ENGLISH; + kLanguage lang = (kLanguage)resMan->getAudioLanguage(); + if (lang != K_LANG_NONE) + return lang; + + lang = K_LANG_ENGLISH; if (_kernel->_selectorCache.printLang != -1) { lang = (kLanguage)GET_SEL32V(_segMan, _gameObj, printLang); -- cgit v1.2.3