diff --git a/src/msw/graphicsd2d.cpp b/src/msw/graphicsd2d.cpp index 5d562102b0..87e1a4bd01 100644 --- a/src/msw/graphicsd2d.cpp +++ b/src/msw/graphicsd2d.cpp @@ -41,8 +41,8 @@ #include #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 diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 431d7a7361..b46c5ef885 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -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();