More MinGW stuff.

This commit is contained in:
Pietro Gagliardi 2015-12-09 15:36:56 -05:00
parent be6555d885
commit 5f530c5bf7
2 changed files with 2 additions and 12 deletions

View File

@ -17,6 +17,7 @@ This README is being written.
* MinGW is currently unsupported. MinGW-w64 support will be re-added once the following features come in:
* [Isolation awareness](https://msdn.microsoft.com/en-us/library/aa375197%28v=vs.85%29.aspx)
* Linker symbols for some functions such as `TaskDialog()` (which I thought I submitted...)
* [A bug in the definition of the C macro `ID2D1RenderTarget_GetSize()`](https://sourceforge.net/p/mingw-w64/mailman/message/33176880/)
* Unix: nothing specific
* Mac OS X: nothing specific, so long as you can build Cocoa programs

View File

@ -24,17 +24,6 @@ uiWindowsDefineControl(
uiAreaType // type function
)
// see https://sourceforge.net/p/mingw-w64/mailman/message/33176880/
// TODO highly unsafe code
static void rtGetSize(ID2D1RenderTarget *rt, D2D1_SIZE_F *size)
{
typedef void (STDMETHODCALLTYPE *gsp)(ID2D1RenderTarget *, D2D1_SIZE_F *);
gsp gs;
gs = (gsp) (rt->lpVtbl->GetSize);
(*gs)(rt, size);
}
static HRESULT doPaint(uiArea *a, ID2D1RenderTarget *rt, RECT *clip)
{
uiAreaHandler *ah = a->ah;
@ -45,7 +34,7 @@ static HRESULT doPaint(uiArea *a, ID2D1RenderTarget *rt, RECT *clip)
dp.Context = newContext(rt);
rtGetSize(rt, &size);
ID2D1RenderTarget_GetSize(rt, &size);
dp.ClientWidth = size.width;
dp.ClientHeight = size.height;