1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Remove console global

This commit is contained in:
Ivan Savenko
2025-02-27 23:10:11 +00:00
parent e5a095a237
commit 782362e5ce
12 changed files with 105 additions and 97 deletions

View File

@ -71,14 +71,14 @@ int main(int argc, const char * argv[])
// Correct working dir executable folder (not bundle folder) so we can use executable relative paths
boost::filesystem::current_path(boost::filesystem::system_complete(argv[0]).parent_path());
console = new CConsoleHandler();
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Server_log.txt", console);
CConsoleHandler console;
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Server_log.txt", &console);
logConfig.configureDefault();
logGlobal->info(SERVER_NAME);
boost::program_options::variables_map opts;
handleCommandOptions(argc, argv, opts);
preinitDLL(console, false);
preinitDLL(false);
logConfig.configure();
loadDLLClasses();