1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

fixes #1482, add one pixel spacing for Chinese fonts

This commit is contained in:
Ivan Savenko
2013-09-25 21:15:15 +00:00
parent 1ea9dab30d
commit eb6ff6b114
2 changed files with 9 additions and 6 deletions

View File

@@ -64,9 +64,12 @@ void CModManager::loadMods()
for (auto modname : installedMods)
{
ResourceID resID("Mods/" + modname + "/mod.json");
std::string name = *CResourceHandler::get()->getResourceName(resID);
auto mod = JsonUtils::JsonFromFile(QString::fromUtf8(name.c_str()));
localMods.insert(QString::fromUtf8(modname.c_str()).toLower(), mod);
if (CResourceHandler::get()->existsResource(resID))
{
std::string name = *CResourceHandler::get()->getResourceName(resID);
auto mod = JsonUtils::JsonFromFile(QString::fromUtf8(name.c_str()));
localMods.insert(QString::fromUtf8(modname.c_str()).toLower(), mod);
}
}
modList->setLocalModList(localMods);
}