Fix build warnings in Direct2D related code

Regressions since df1456e4e2 and
b936bfe85e.

See https://github.com/wxWidgets/wxWidgets/pull/731
This commit is contained in:
Maarten Bent
2018-02-14 23:05:24 +01:00
committed by Vadim Zeitlin
parent b493b7008b
commit 8577d9ddca
2 changed files with 6 additions and 6 deletions

View File

@@ -41,8 +41,8 @@
#include <wincodec.h>
#ifdef __MINGW64_TOOLCHAIN__
#ifndef DRWITE_E_NOFONT
#define DWRITE_E_NOFONT _HRESULT_TYPEDEF_(0x88985002)
#ifndef DWRITE_E_NOFONT
#define DWRITE_E_NOFONT _HRESULT_TYPEDEF_(0x88985002L)
#endif
#endif

View File

@@ -797,9 +797,9 @@ bool SurfaceFontDataD2D::Initialised() const
// SurfaceDataD2D
SurfaceDataD2D::SurfaceDataD2D(ScintillaWX* editor)
: m_editor(editor),
m_pD2DFactory(::wxD2D1Factory()),
m_pDWriteFactory(::wxDWriteFactory())
: m_pD2DFactory(::wxD2D1Factory()),
m_pDWriteFactory(::wxDWriteFactory()),
m_editor(editor)
{
if ( Initialised() )
{
@@ -1107,7 +1107,7 @@ void SurfaceD2D::Release()
m_clipsActive--;
}
hr = m_pRenderTarget->EndDraw();
if ( hr == D2DERR_RECREATE_TARGET && m_surfaceData && !m_ownRenderTarget )
if ( hr == (HRESULT)D2DERR_RECREATE_TARGET && m_surfaceData && !m_ownRenderTarget )
{
m_surfaceData->DiscardGraphicsResources();
m_surfaceData->SetEditorPaintAbandoned();