From 8fed3b76c85e9c58dfc48a8aabed94017aa64339 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Tue, 25 Sep 2012 00:47:37 +0000 Subject: [PATCH] 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. --- Source/Core/Common/Src/VideoBackendBase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/Common/Src/VideoBackendBase.cpp b/Source/Core/Common/Src/VideoBackendBase.cpp index 1fbe0f4a41..339cb016c1 100644 --- a/Source/Core/Common/Src/VideoBackendBase.cpp +++ b/Source/Core/Common/Src/VideoBackendBase.cpp @@ -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::const_iterator it = g_available_video_backends.begin(); it != g_available_video_backends.end(); ++it) if (name == (*it)->GetName()) g_video_backend = *it;