Apply erans patch to allow building with MinGW

This commit is contained in:
New Pagodi
2018-01-25 16:08:33 -06:00
parent b936bfe85e
commit df1456e4e2
2 changed files with 10 additions and 0 deletions

View File

@@ -40,6 +40,12 @@
#include <dwrite.h>
#include <wincodec.h>
#ifdef __MINGW64_TOOLCHAIN__
#ifndef DRWITE_E_NOFONT
#define DWRITE_E_NOFONT _HRESULT_TYPEDEF_(0x88985002)
#endif
#endif
#if wxD2D_DEVICE_CONTEXT_SUPPORTED
#include <D3D11.h>
#include <D2d1_1.h>

View File

@@ -48,6 +48,8 @@
#if wxUSE_GRAPHICS_DIRECT2D
#include "ScintillaWX.h"
#include <float.h>
#include "wx/dcscreen.h"
#endif
Point Point::FromLong(long lpoint) {
@@ -732,10 +734,12 @@ SurfaceFontDataD2D::SurfaceFontDataD2D(const FontParameters& fp)
{
fontWeight = DWRITE_FONT_WEIGHT_LIGHT;
}
#ifndef __MINGW64_TOOLCHAIN__
else if ( weight <= 350 )
{
fontWeight = DWRITE_FONT_WEIGHT_SEMI_LIGHT;
}
#endif
else if ( weight <= 400 )
{
fontWeight = DWRITE_FONT_WEIGHT_NORMAL;