mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
iOS: don't create unused CConsoleHandler
This commit is contained in:
parent
70c51e4370
commit
53ac61b52b
@ -104,7 +104,9 @@ static po::variables_map vm;
|
||||
|
||||
//static bool setResolution = false; //set by event handling thread after resolution is adjusted
|
||||
|
||||
#ifndef VCMI_IOS
|
||||
void processCommand(const std::string &message);
|
||||
#endif
|
||||
static void setScreenRes(int w, int h, int bpp, bool fullscreen, int displayIndex, bool resetVideo=true);
|
||||
void playIntro();
|
||||
static void mainLoop();
|
||||
@ -236,9 +238,11 @@ int main(int argc, char * argv[])
|
||||
// Init old logging system and new (temporary) logging system
|
||||
CStopWatch total, pomtime;
|
||||
std::cout.flags(std::ios::unitbuf);
|
||||
#ifndef VCMI_IOS
|
||||
console = new CConsoleHandler();
|
||||
*console->cb = processCommand;
|
||||
console->start();
|
||||
#endif
|
||||
|
||||
const bfs::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Client_log.txt";
|
||||
logConfig = new CBasicLogConfigurator(logPath, console);
|
||||
@ -553,6 +557,7 @@ void removeGUI()
|
||||
LOCPLINT = nullptr;
|
||||
}
|
||||
|
||||
#ifndef VCMI_IOS
|
||||
void processCommand(const std::string &message)
|
||||
{
|
||||
std::istringstream readed;
|
||||
@ -965,6 +970,7 @@ void processCommand(const std::string &message)
|
||||
LOCPLINT->cb->sendMessage(message);
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
//plays intro, ends when intro is over or button has been pressed (handles events)
|
||||
void playIntro()
|
||||
|
@ -27,7 +27,9 @@ void MainWindow::load()
|
||||
// This is important on Mac for relative paths to work inside DMG.
|
||||
QDir::setCurrent(QApplication::applicationDirPath());
|
||||
|
||||
#ifndef VCMI_IOS
|
||||
console = new CConsoleHandler();
|
||||
#endif
|
||||
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Launcher_log.txt", console);
|
||||
logConfig.configureDefault();
|
||||
|
||||
|
@ -346,7 +346,11 @@ EConsoleTextColor::EConsoleTextColor CColorMapping::getColorFor(const CLoggerDom
|
||||
throw std::runtime_error("failed to find color for requested domain/level pair");
|
||||
}
|
||||
|
||||
CLogConsoleTarget::CLogConsoleTarget(CConsoleHandler * console) : console(console), threshold(ELogLevel::INFO), coloredOutputEnabled(true)
|
||||
CLogConsoleTarget::CLogConsoleTarget(CConsoleHandler * console) :
|
||||
#ifndef VCMI_IOS
|
||||
console(console),
|
||||
#endif
|
||||
threshold(ELogLevel::INFO), coloredOutputEnabled(true)
|
||||
{
|
||||
formatter.setPattern("%m");
|
||||
}
|
||||
|
@ -198,7 +198,9 @@ public:
|
||||
void write(const LogRecord & record) override;
|
||||
|
||||
private:
|
||||
#ifndef VCMI_IOS
|
||||
CConsoleHandler * console;
|
||||
#endif
|
||||
ELogLevel::ELogLevel threshold;
|
||||
bool coloredOutputEnabled;
|
||||
CLogFormatter formatter;
|
||||
|
@ -935,7 +935,9 @@ int main(int argc, char * argv[])
|
||||
signal(SIGSEGV, handleLinuxSignal);
|
||||
#endif
|
||||
|
||||
#ifndef VCMI_IOS
|
||||
console = new CConsoleHandler();
|
||||
#endif
|
||||
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Server_log.txt", console);
|
||||
logConfig.configureDefault();
|
||||
logGlobal->info(SERVER_NAME);
|
||||
|
Loading…
Reference in New Issue
Block a user