diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-06-24 10:43:46 +0200 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2016-06-24 10:43:46 +0200 |
| commit | 3570c7f03a2aa90aa634f96c0af1969af610f14d (patch) | |
| tree | 4252e03c0e853ba7cffe022937698c854ad0eaa9 /Source/Core/VideoCommon/VideoBackendBase.cpp | |
| parent | 2115e8a4a6814e32107b5205ff5c95bbd3c6e99c (diff) | |
Reformat all the things. Have fun with merge conflicts.
Diffstat (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VideoBackendBase.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp index 717a9e3be6..f3fbb074fb 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.cpp +++ b/Source/Core/VideoCommon/VideoBackendBase.cpp @@ -34,49 +34,49 @@ __declspec(dllexport) DWORD NvOptimusEnablement = 1; void VideoBackendBase::PopulateList() { - // OGL > D3D11 > D3D12 > SW - g_available_video_backends.push_back(std::make_unique<OGL::VideoBackend>()); + // OGL > D3D11 > D3D12 > SW + g_available_video_backends.push_back(std::make_unique<OGL::VideoBackend>()); #ifdef _WIN32 - g_available_video_backends.push_back(std::make_unique<DX11::VideoBackend>()); - - // More robust way to check for D3D12 support than (unreliable) OS version checks. - HMODULE d3d12_module = LoadLibraryA("d3d12.dll"); - if (d3d12_module != nullptr) - { - FreeLibrary(d3d12_module); - g_available_video_backends.push_back(std::make_unique<DX12::VideoBackend>()); - } + g_available_video_backends.push_back(std::make_unique<DX11::VideoBackend>()); + + // More robust way to check for D3D12 support than (unreliable) OS version checks. + HMODULE d3d12_module = LoadLibraryA("d3d12.dll"); + if (d3d12_module != nullptr) + { + FreeLibrary(d3d12_module); + g_available_video_backends.push_back(std::make_unique<DX12::VideoBackend>()); + } #endif - g_available_video_backends.push_back(std::make_unique<SW::VideoSoftware>()); + g_available_video_backends.push_back(std::make_unique<SW::VideoSoftware>()); - const auto iter = std::find_if(g_available_video_backends.begin(), g_available_video_backends.end(), [](const auto& backend) { - return backend != nullptr; - }); + const auto iter = + std::find_if(g_available_video_backends.begin(), g_available_video_backends.end(), + [](const auto& backend) { return backend != nullptr; }); - if (iter == g_available_video_backends.end()) - return; + if (iter == g_available_video_backends.end()) + return; - s_default_backend = iter->get(); - g_video_backend = iter->get(); + s_default_backend = iter->get(); + g_video_backend = iter->get(); } void VideoBackendBase::ClearList() { - g_available_video_backends.clear(); + g_available_video_backends.clear(); } void VideoBackendBase::ActivateBackend(const std::string& name) { - // If empty, set it to the default backend (expected behavior) - if (name.empty()) - g_video_backend = s_default_backend; + // If empty, set it to the default backend (expected behavior) + if (name.empty()) + g_video_backend = s_default_backend; - const auto iter = std::find_if(g_available_video_backends.begin(), g_available_video_backends.end(), [&name](const auto& backend) { - return name == backend->GetName(); - }); + const auto iter = + std::find_if(g_available_video_backends.begin(), g_available_video_backends.end(), + [&name](const auto& backend) { return name == backend->GetName(); }); - if (iter == g_available_video_backends.end()) - return; + if (iter == g_available_video_backends.end()) + return; - g_video_backend = iter->get(); + g_video_backend = iter->get(); } |
