If setting videobackend back to null strings, Just set it to the front of the list. Fixes loading game specific INI files that don't load back the "default" video backend which is nothing.

This commit is contained in:
Sonicadvance1 2012-09-25 00:47:37 +00:00
parent 41266129ba
commit 8fed3b76c8

View file

@ -69,6 +69,9 @@ void VideoBackend::ClearList()
void VideoBackend::ActivateBackend(const std::string& name)
{
if (name.length() == 0) // If NULL, set it to the first one in the list. Expected behavior
g_video_backend = g_available_video_backends.front();
for (std::vector<VideoBackend*>::const_iterator it = g_available_video_backends.begin(); it != g_available_video_backends.end(); ++it)
if (name == (*it)->GetName())
g_video_backend = *it;