mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 17:29:55 +00:00
Fix an issue preventing compilation, revealing another that doesn't make much sense.
This commit is contained in:
parent
c1ffc9e776
commit
2a9b12bb3f
2 changed files with 16 additions and 3 deletions
|
@ -145,7 +145,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||||
"\n\twin1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages\n"
|
"\n\twin1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages\n"
|
||||||
"\n\twin1252 - Western European (Latin) alphabet, used by default")
|
"\n\twin1252 - Western European (Latin) alphabet, used by default")
|
||||||
|
|
||||||
("fallback", bpo::value<FallbackMap>()->default_value(FallbackMap(), "")
|
("fallback", bpo::value<EscapeFallbackMap>()->default_value(EscapeFallbackMap(), "")
|
||||||
->multitoken()->composing(), "fallback values")
|
->multitoken()->composing(), "fallback values")
|
||||||
|
|
||||||
("no-grab", "Don't grab mouse cursor")
|
("no-grab", "Don't grab mouse cursor")
|
||||||
|
@ -248,7 +248,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||||
|
|
||||||
// other settings
|
// other settings
|
||||||
engine.setSoundUsage(!variables["no-sound"].as<bool>());
|
engine.setSoundUsage(!variables["no-sound"].as<bool>());
|
||||||
engine.setFallbackValues(variables["fallback"].as<FallbackMap>().mMap);
|
engine.setFallbackValues(variables["fallback"].as<EscapeFallbackMap>().toFallbackMap().mMap);
|
||||||
engine.setActivationDistanceOverride (variables["activate-dist"].as<int>());
|
engine.setActivationDistanceOverride (variables["activate-dist"].as<int>());
|
||||||
engine.enableFontExport(variables["export-fonts"].as<bool>());
|
engine.enableFontExport(variables["export-fonts"].as<bool>());
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,20 @@ namespace Fallback
|
||||||
{
|
{
|
||||||
|
|
||||||
struct FallbackMap {
|
struct FallbackMap {
|
||||||
|
std::map<std::string, std::string> mMap;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct EscapeFallbackMap : FallbackMap
|
||||||
|
{
|
||||||
std::map<Files::EscapeHashString, Files::EscapeHashString> mMap;
|
std::map<Files::EscapeHashString, Files::EscapeHashString> mMap;
|
||||||
|
|
||||||
|
FallbackMap toFallbackMap() const
|
||||||
|
{
|
||||||
|
FallbackMap temp = FallbackMap();
|
||||||
|
for (std::map<Files::EscapeHashString, Files::EscapeHashString>::const_iterator it = mMap.begin(); it != mMap.end(); ++it)
|
||||||
|
temp.mMap[it->first.toStdString()] = it->second.toStdString();
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void validate(boost::any &v, std::vector<std::string> const &tokens, FallbackMap*, int)
|
void validate(boost::any &v, std::vector<std::string> const &tokens, FallbackMap*, int)
|
||||||
|
|
Loading…
Reference in a new issue