summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/main.cpp
diff options
context:
space:
mode:
authorSilent <zdanio95@gmail.com>2019-07-21 17:29:08 +0200
committerSilent <zdanio95@gmail.com>2019-07-29 16:47:45 +0200
commit43bfb183c22de508afd2f1b156c9aed15260b01a (patch)
treed77882e8c7bdcf4728d43e4a5eed9d6f7ad216fd /Source/Core/VideoBackends/D3D/main.cpp
parentff00873610a3cd55e76245ef0aae892026fedd9b (diff)
D3D11: Show a warning message about unsupported features when switching to D3D11 backend on Windows 7
Diffstat (limited to 'Source/Core/VideoBackends/D3D/main.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/main.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/D3D/main.cpp b/Source/Core/VideoBackends/D3D/main.cpp
index 6c4bf20dd1..33c9117f25 100644
--- a/Source/Core/VideoBackends/D3D/main.cpp
+++ b/Source/Core/VideoBackends/D3D/main.cpp
@@ -37,6 +37,31 @@ std::string VideoBackend::GetDisplayName() const
return _trans("Direct3D 11");
}
+std::optional<std::string> VideoBackend::GetWarningMessage() const
+{
+ std::optional<std::string> result;
+
+ // If user is on Win7, show a warning about partial DX11.1 support
+ // This is being called BEFORE FillBackendInfo is called for this backend,
+ // so query for logic op support manually
+ bool supportsLogicOp = false;
+ if (D3DCommon::LoadLibraries())
+ {
+ supportsLogicOp = D3D::SupportsLogicOp(g_Config.iAdapter);
+ D3DCommon::UnloadLibraries();
+ }
+
+ if (!supportsLogicOp)
+ {
+ result = _trans("Direct3D 11 renderer requires support for features not supported by your "
+ "system configuration. This is most likely because you are using Windows 7. "
+ "You may still use this backend, but you might encounter graphical artifacts."
+ "\n\nDo you really want to switch to Direct3D 11? If unsure, select 'No'.");
+ }
+
+ return result;
+}
+
void VideoBackend::InitBackendInfo()
{
if (!D3DCommon::LoadLibraries())