windows/direct2d: fix ID2D1RenderTarget::GetPixelFormat() and ID2D1RenderTarget::GetSize() typedefs in MinGW-w64 ABI workaround
MinGW-w64 recently added manual workarounds directly into the class via overloads that make existing Direct2D code source-compatible. However, that exposed an error in my definition of the typedefs I was using in my own workaround: both of these methods are const, even in MSVC, but I neglected to include the const qualifier. I'm not sure how this code compiled in the past, but now the overload resolution engine finds no match. I want to remain compatible with versions of MinGW-w64 old enough to not have their fix, so our fix remains. Fixes #446.
This commit is contained in:
parent
9c164a2c5c
commit
e8daaf659e
|
@ -314,7 +314,7 @@ static void drawGrid(ID2D1RenderTarget *rt, D2D1_RECT_F *fillRect)
|
||||||
pformat = rt->GetPixelFormat();
|
pformat = rt->GetPixelFormat();
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
typedef D2D1_PIXEL_FORMAT *(__stdcall ID2D1RenderTarget::* GetPixelFormatF)(D2D1_PIXEL_FORMAT *);
|
typedef D2D1_PIXEL_FORMAT *(__stdcall ID2D1RenderTarget::* GetPixelFormatF)(D2D1_PIXEL_FORMAT *) const;
|
||||||
GetPixelFormatF gpf;
|
GetPixelFormatF gpf;
|
||||||
|
|
||||||
gpf = (GetPixelFormatF) (&(rt->GetPixelFormat));
|
gpf = (GetPixelFormatF) (&(rt->GetPixelFormat));
|
||||||
|
|
|
@ -144,7 +144,7 @@ D2D1_SIZE_F realGetSize(ID2D1RenderTarget *rt)
|
||||||
return rt->GetSize();
|
return rt->GetSize();
|
||||||
#else
|
#else
|
||||||
D2D1_SIZE_F size;
|
D2D1_SIZE_F size;
|
||||||
typedef D2D1_SIZE_F *(__stdcall ID2D1RenderTarget::* GetSizeF)(D2D1_SIZE_F *);
|
typedef D2D1_SIZE_F *(__stdcall ID2D1RenderTarget::* GetSizeF)(D2D1_SIZE_F *) const;
|
||||||
GetSizeF gs;
|
GetSizeF gs;
|
||||||
|
|
||||||
gs = (GetSizeF) (&(rt->GetSize));
|
gs = (GetSizeF) (&(rt->GetSize));
|
||||||
|
|
Loading…
Reference in New Issue