mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix android build.
This commit is contained in:
parent
dc9082d88c
commit
3eb3996241
2
Global.h
2
Global.h
@ -137,7 +137,9 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#ifndef VCMI_ANDROID
|
||||
#include <boost/locale/generator.hpp>
|
||||
#endif
|
||||
#include <boost/logic/tribool.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
|
@ -194,6 +194,10 @@ int SDL_main(int argc, char *argv[])
|
||||
int main(int argc, char** argv)
|
||||
#endif
|
||||
{
|
||||
#ifdef VCMI_ANDROID
|
||||
// boost will crash without this
|
||||
setenv("LANG", "C", 1);
|
||||
#endif
|
||||
#ifdef VCMI_APPLE
|
||||
// Correct working dir executable folder (not bundle folder) so we can use executable relative paths
|
||||
std::string executablePath = argv[0];
|
||||
@ -286,10 +290,6 @@ int main(int argc, char** argv)
|
||||
logGlobal->infoStream() << "Creating console and configuring logger: " << pomtime.getDiff();
|
||||
logGlobal->infoStream() << "The log file will be saved to " << logPath;
|
||||
|
||||
#ifdef VCMI_ANDROID
|
||||
// boost will crash without this
|
||||
setenv("LANG", "C", 1);
|
||||
#endif
|
||||
// Init filesystem and settings
|
||||
preinitDLL(::console);
|
||||
settings.init();
|
||||
|
@ -573,7 +573,9 @@ namespace VCMIDirs
|
||||
static bool initialized = false;
|
||||
if (!initialized)
|
||||
{
|
||||
#ifndef VCMI_ANDROID
|
||||
std::locale::global(boost::locale::generator().generate("en_US.UTF-8"));
|
||||
#endif
|
||||
boost::filesystem::path::imbue(std::locale());
|
||||
|
||||
singleton.init();
|
||||
|
Loading…
Reference in New Issue
Block a user