1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Mobile platforms will use software cursor as default

This commit is contained in:
Ivan Savenko 2023-01-19 18:14:51 +02:00
parent f5a7f5173f
commit 5484efde90

View File

@ -7,6 +7,7 @@
* Full text of license available in license.txt file, in main folder
*
*/
#include "StdInc.h"
#include "CursorHandler.h"
@ -17,14 +18,22 @@
#include "CAnimation.h"
#include "../../lib/CConfigHandler.h"
//#include "../CMT.h"
std::unique_ptr<ICursor> CursorHandler::createCursor()
{
if (settings["video"]["softwareCursor"].Bool())
if (settings["video"]["cursor"].String() == "auto")
{
#if defined(VCMI_ANDROID) || defined(VCMI_IOS)
return std::make_unique<CursorSoftware>();
else
#else
return std::make_unique<CursorHardware>();
#endif
}
if (settings["video"]["cursor"].String() == "hardware")
return std::make_unique<CursorHardware>();
assert(settings["video"]["cursor"].String() == "software");
return std::make_unique<CursorSoftware>();
}
CursorHandler::CursorHandler()