1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Change ClientCommandManager to become non-static

This commit is contained in:
Dydzio
2023-01-15 01:09:58 +01:00
parent 91a52ebb8e
commit 06376ca4ef
4 changed files with 23 additions and 12 deletions

View File

@@ -239,7 +239,14 @@ int main(int argc, char * argv[])
std::cout.flags(std::ios::unitbuf);
#ifndef VCMI_IOS
console = new CConsoleHandler();
*console->cb = ClientCommandManager::processCommand;
auto callbackFunction = [](std::string buffer, bool calledFromIngameConsole)
{
ClientCommandManager commandController;
commandController.processCommand(buffer, calledFromIngameConsole);
};
*console->cb = callbackFunction;
console->start();
#endif