1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-23 12:08:45 +02:00

Merge pull request #1005 from kambala-decapitator/ios-min-12

raise iOS deployment target to 12.0
This commit is contained in:
Andrii Danylchenko 2022-09-29 19:57:04 +03:00 committed by GitHub
commit dae726b82d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 4 deletions

View File

@ -171,7 +171,7 @@ endif()
if(APPLE_IOS) if(APPLE_IOS)
set(CMAKE_MACOSX_RPATH 1) set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.0) set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0)
list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_PREFIX_PATH}") # required for Boost list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_PREFIX_PATH}") # required for Boost
set(CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH FALSE) set(CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH FALSE)

View File

@ -104,7 +104,9 @@ static po::variables_map vm;
//static bool setResolution = false; //set by event handling thread after resolution is adjusted //static bool setResolution = false; //set by event handling thread after resolution is adjusted
#ifndef VCMI_IOS
void processCommand(const std::string &message); void processCommand(const std::string &message);
#endif
static void setScreenRes(int w, int h, int bpp, bool fullscreen, int displayIndex, bool resetVideo=true); static void setScreenRes(int w, int h, int bpp, bool fullscreen, int displayIndex, bool resetVideo=true);
void playIntro(); void playIntro();
static void mainLoop(); static void mainLoop();
@ -236,9 +238,11 @@ int main(int argc, char * argv[])
// Init old logging system and new (temporary) logging system // Init old logging system and new (temporary) logging system
CStopWatch total, pomtime; CStopWatch total, pomtime;
std::cout.flags(std::ios::unitbuf); std::cout.flags(std::ios::unitbuf);
#ifndef VCMI_IOS
console = new CConsoleHandler(); console = new CConsoleHandler();
*console->cb = processCommand; *console->cb = processCommand;
console->start(); console->start();
#endif
const bfs::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Client_log.txt"; const bfs::path logPath = VCMIDirs::get().userLogsPath() / "VCMI_Client_log.txt";
logConfig = new CBasicLogConfigurator(logPath, console); logConfig = new CBasicLogConfigurator(logPath, console);
@ -553,6 +557,7 @@ void removeGUI()
LOCPLINT = nullptr; LOCPLINT = nullptr;
} }
#ifndef VCMI_IOS
void processCommand(const std::string &message) void processCommand(const std::string &message)
{ {
std::istringstream readed; std::istringstream readed;
@ -965,6 +970,7 @@ void processCommand(const std::string &message)
LOCPLINT->cb->sendMessage(message); LOCPLINT->cb->sendMessage(message);
}*/ }*/
} }
#endif
//plays intro, ends when intro is over or button has been pressed (handles events) //plays intro, ends when intro is over or button has been pressed (handles events)
void playIntro() void playIntro()
@ -975,6 +981,7 @@ void playIntro()
} }
} }
#ifndef VCMI_IOS
static bool checkVideoMode(int monitorIndex, int w, int h) static bool checkVideoMode(int monitorIndex, int w, int h)
{ {
//we only check that our desired window size fits on screen //we only check that our desired window size fits on screen
@ -996,6 +1003,7 @@ static bool checkVideoMode(int monitorIndex, int w, int h)
return false; return false;
} }
#endif
static void cleanupRenderer() static void cleanupRenderer()
{ {

View File

@ -84,8 +84,6 @@
using namespace CSDL_Ext; using namespace CSDL_Ext;
void processCommand(const std::string &message, CClient *&client);
extern std::queue<SDL_Event> SDLEventsQueue; extern std::queue<SDL_Event> SDLEventsQueue;
extern boost::mutex eventsM; extern boost::mutex eventsM;
boost::recursive_mutex * CPlayerInterface::pim = new boost::recursive_mutex; boost::recursive_mutex * CPlayerInterface::pim = new boost::recursive_mutex;

View File

@ -27,7 +27,9 @@ void MainWindow::load()
// This is important on Mac for relative paths to work inside DMG. // This is important on Mac for relative paths to work inside DMG.
QDir::setCurrent(QApplication::applicationDirPath()); QDir::setCurrent(QApplication::applicationDirPath());
#ifndef VCMI_IOS
console = new CConsoleHandler(); console = new CConsoleHandler();
#endif
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Launcher_log.txt", console); CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Launcher_log.txt", console);
logConfig.configureDefault(); logConfig.configureDefault();

View File

@ -346,7 +346,11 @@ EConsoleTextColor::EConsoleTextColor CColorMapping::getColorFor(const CLoggerDom
throw std::runtime_error("failed to find color for requested domain/level pair"); 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"); formatter.setPattern("%m");
} }

View File

@ -198,7 +198,9 @@ public:
void write(const LogRecord & record) override; void write(const LogRecord & record) override;
private: private:
#ifndef VCMI_IOS
CConsoleHandler * console; CConsoleHandler * console;
#endif
ELogLevel::ELogLevel threshold; ELogLevel::ELogLevel threshold;
bool coloredOutputEnabled; bool coloredOutputEnabled;
CLogFormatter formatter; CLogFormatter formatter;

View File

@ -935,7 +935,9 @@ int main(int argc, char * argv[])
signal(SIGSEGV, handleLinuxSignal); signal(SIGSEGV, handleLinuxSignal);
#endif #endif
#ifndef VCMI_IOS
console = new CConsoleHandler(); console = new CConsoleHandler();
#endif
CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Server_log.txt", console); CBasicLogConfigurator logConfig(VCMIDirs::get().userLogsPath() / "VCMI_Server_log.txt", console);
logConfig.configureDefault(); logConfig.configureDefault();
logGlobal->info(SERVER_NAME); logGlobal->info(SERVER_NAME);