From 15c65384f6e4e7c4e3b2550db79be545ecef944f Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 6 Oct 2013 19:14:32 +0300 Subject: [PATCH] Gfx: Try to load D2D only on Win7+ --- Common/Gfx/CanvasD2D.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Common/Gfx/CanvasD2D.cpp b/Common/Gfx/CanvasD2D.cpp index fe1c7d12..86c7f6a0 100644 --- a/Common/Gfx/CanvasD2D.cpp +++ b/Common/Gfx/CanvasD2D.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "../Platform.h" #include "CanvasD2D.h" #include "TextFormatD2D.h" #include "Util/DWriteFontCollectionLoader.h" @@ -67,6 +68,8 @@ bool CanvasD2D::Initialize() ++c_Instances; if (c_Instances == 1) { + if (!Platform::IsAtLeastWin7()) return false; + D2D1_FACTORY_OPTIONS fo = {}; #ifdef _DEBUG fo.debugLevel = D2D1_DEBUG_LEVEL_INFORMATION;