# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1287155590 0 # Node ID da9c4cfe8f8ee7c3406333d8175e6cc0258ec398 # Parent 2851e232a11360f1214991abd93e076138ea5e0f * The engine now checks to make sure the selected driver is supported by the users OS. diff -r 2851e232a113 -r da9c4cfe8f8e engine/core/controller/engine.cpp --- a/engine/core/controller/engine.cpp Thu Oct 14 15:52:43 2010 +0000 +++ b/engine/core/controller/engine.cpp Fri Oct 15 15:13:10 2010 +0000 @@ -21,6 +21,7 @@ // Standard C++ library includes #include +#include // 3rd party library includes #include @@ -200,7 +201,18 @@ } FL_LOG(_log, "Initializing render backend"); m_renderbackend->setColorKeyEnabled(m_settings.isColorKeyEnabled()); - m_renderbackend->init(m_settings.getVideoDriver()); + + std::string driver = m_settings.getVideoDriver(); + std::vector drivers = m_devcaps.getAvailableDrivers(); + + if (driver != ""){ + if (std::find (drivers.begin(), drivers.end(), driver) == drivers.end()) { + FL_WARN(_log, "Selected driver is not supported for your Operating System! Reverting to default driver."); + driver = ""; + } + } + + m_renderbackend->init(driver); FL_LOG(_log, "Querying device capabilities"); m_devcaps.fillDeviceCaps();