Game displays an error message and uses default graphics device when unknown device is selected with -graphics switch

master
Tomasz Kapuściński 2015-07-18 12:03:33 +02:00
parent 1d69021e94
commit 59a68892c6
1 changed files with 3 additions and 1 deletions

View File

@ -540,8 +540,10 @@ bool CApplication::Create()
if (m_device == nullptr) if (m_device == nullptr)
{ {
m_device = MakeUnique<Gfx::CNullDevice>();
GetLogger()->Error("Unknown graphics device: %s\n", m_graphics.c_str()); GetLogger()->Error("Unknown graphics device: %s\n", m_graphics.c_str());
GetLogger()->Info("Changing to default device\n");
GetSystemUtils()->SystemDialog(SDT_ERROR, "Graphics initialization error", "You have selected invalid graphics device with -graphics switch. Game will use default OpenGL device instead.");
m_device = Gfx::CreateDevice(m_deviceConfig, "opengl");
} }
} }
else else