diff options
author | Neil <nyamatongwe@gmail.com> | 2013-10-17 08:20:35 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-10-17 08:20:35 +1100 |
commit | 1c96d6025529a674f5155b1378adf9aab3ed1ea5 (patch) | |
tree | 279f47dd9efc5c1a88ee4e3299ee36c71ce58d4f | |
parent | 112f1007b78da4af471f955b966f5f46235c2693 (diff) | |
download | scintilla-mirror-1c96d6025529a674f5155b1378adf9aab3ed1ea5.tar.gz |
Avoid failure in MinGW-w64 Direct2D binding.
-rw-r--r-- | win32/PlatWin.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 3f8c32eb6..dd2d3da6a 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1295,7 +1295,12 @@ void SurfaceD2D::InitPixMap(int width, int height, Surface *surface_, WindowID) SurfaceD2D *psurfOther = static_cast<SurfaceD2D *>(surface_); ID2D1BitmapRenderTarget *pCompatibleRenderTarget = NULL; D2D1_SIZE_F desiredSize = D2D1::SizeF(width, height); - D2D1_PIXEL_FORMAT desiredFormat = psurfOther->pRenderTarget->GetPixelFormat(); + D2D1_PIXEL_FORMAT desiredFormat; +#ifdef __MINGW32__ + desiredFormat.format = DXGI_FORMAT_UNKNOWN; +#else + desiredFormat = psurfOther->pRenderTarget->GetPixelFormat(); +#endif desiredFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE; HRESULT hr = psurfOther->pRenderTarget->CreateCompatibleRenderTarget( &desiredSize, NULL, &desiredFormat, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_NONE, &pCompatibleRenderTarget); |