aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorThierry Crozat2011-06-24 20:20:32 +0100
committerThierry Crozat2011-06-24 20:21:08 +0100
commitb35f4d31a64588a4a1f99e38df16bffc0abaf0b2 (patch)
tree72eed683d44bc14a344b7a1e14be82eb82882b55 /common
parent2b03a3a0e6569cd4a6b940304a4582860a97789f (diff)
downloadscummvm-rg350-b35f4d31a64588a4a1f99e38df16bffc0abaf0b2.tar.gz
scummvm-rg350-b35f4d31a64588a4a1f99e38df16bffc0abaf0b2.tar.bz2
scummvm-rg350-b35f4d31a64588a4a1f99e38df16bffc0abaf0b2.zip
COMMON: Look for translations.dat in Theme path before using SearchMan
Diffstat (limited to 'common')
-rw-r--r--common/translation.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/translation.cpp b/common/translation.cpp
index 59488c2dd5..e456f733fd 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -223,7 +223,11 @@ String TranslationManager::getLangById(int id) const {
}
bool TranslationManager::openTranslationsFile(File& inFile) {
- // First try to open it using the SearchMan.
+ // First look in the Themepath if we can find the file.
+ if (ConfMan.hasKey("themepath") && openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile))
+ return true;
+
+ // Then try to open it using the SearchMan.
ArchiveMemberList fileList;
SearchMan.listMatchingMembers(fileList, "translations.dat");
for (ArchiveMemberList::iterator it = fileList.begin(); it != fileList.end(); ++it) {
@@ -235,10 +239,6 @@ bool TranslationManager::openTranslationsFile(File& inFile) {
}
}
- // Then look in the Themepath if we can find the file.
- if (ConfMan.hasKey("themepath"))
- return openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile);
-
return false;
}