diff options
| author | Sonicadvance1 <Sonicadvance1@gmail.com> | 2012-09-25 00:47:37 +0000 |
|---|---|---|
| committer | Sonicadvance1 <Sonicadvance1@gmail.com> | 2012-09-25 00:47:37 +0000 |
| commit | 8fed3b76c85e9c58dfc48a8aabed94017aa64339 (patch) | |
| tree | 28d61a948cddd5067b7d0aedb9769b4eaa45ac61 /Source/Core | |
| parent | 41266129ba15ce8de5b97312478684347c87d8a5 (diff) | |
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.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/Src/VideoBackendBase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<VideoBackend*>::const_iterator it = g_available_video_backends.begin(); it != g_available_video_backends.end(); ++it) if (name == (*it)->GetName()) g_video_backend = *it; |
