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:
parent
41266129ba
commit
8fed3b76c8
|
@ -69,6 +69,9 @@ void VideoBackend::ClearList()
|
||||||
|
|
||||||
void VideoBackend::ActivateBackend(const std::string& name)
|
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)
|
for (std::vector<VideoBackend*>::const_iterator it = g_available_video_backends.begin(); it != g_available_video_backends.end(); ++it)
|
||||||
if (name == (*it)->GetName())
|
if (name == (*it)->GetName())
|
||||||
g_video_backend = *it;
|
g_video_backend = *it;
|
||||||
|
|
Loading…
Reference in New Issue