Move platform detection to CMake

This commit is contained in:
numzero
2023-02-19 22:44:02 +03:00
parent 38f18eec56
commit 06db7b7ab7
10 changed files with 201 additions and 309 deletions

View File

@ -10,15 +10,17 @@ static int test_fail = 0;
void test_irr_array();
void test_irr_string();
static video::E_DRIVER_TYPE chooseDriver(const char *arg_)
static video::E_DRIVER_TYPE chooseDriver(core::stringc arg_)
{
if (core::stringc(arg_) == "null")
if (arg_ == "null")
return video::EDT_NULL;
if (IrrlichtDevice::isDriverSupported(video::EDT_OGLES1))
if (arg_ == "ogles1")
return video::EDT_OGLES1;
if (IrrlichtDevice::isDriverSupported(video::EDT_OGLES2))
if (arg_ == "ogles2")
return video::EDT_OGLES2;
if (arg_ == "opengl")
return video::EDT_OPENGL;
std::cerr << "Unknown driver type: " << arg_.c_str() << ". Trying OpenGL." << std::endl;
return video::EDT_OPENGL;
}