aboutsummaryrefslogtreecommitdiff
path: root/examples/AutomatedTest/main.cpp
diff options
context:
space:
mode:
authornumzero <numzer0@yandex.ru>2023-02-19 22:44:02 +0300
committernumzero <numzer0@yandex.ru>2023-02-22 21:11:12 +0300
commit06db7b7ab7a4b439545a409d03d1e075506699ec (patch)
treeaecbb130299c8aa72de7a2a0d97fcb7abe02fbde /examples/AutomatedTest/main.cpp
parent38f18eec569f88496465b04c152de905087ca9e2 (diff)
downloadirrlicht-06db7b7ab7a4b439545a409d03d1e075506699ec.tar.xz
Move platform detection to CMake
Diffstat (limited to 'examples/AutomatedTest/main.cpp')
-rw-r--r--examples/AutomatedTest/main.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/AutomatedTest/main.cpp b/examples/AutomatedTest/main.cpp
index e724176..0141b2b 100644
--- a/examples/AutomatedTest/main.cpp
+++ b/examples/AutomatedTest/main.cpp
@@ -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;
}