Problem with some struct (solved by myself)
This was written with automatic translation
I had trouble with d2d1.d's RenderTarget.DrawLine not working On a whim, I deleted this(this) {} of D2D_POINT_2F in d2dbasetypes.d Then it worked
I found another crash issue and solved it, so I report it. This was easy because I found a note. in ID2D1Bitmap old => ref D2D1_SIZE_F GetSize() const; new => void GetSize(D2D1_SIZE_F* outSize) const;
Hi, sorry but I bit busy and won't be able to fix this next two weeks, if you make pull request with said fixes I will merge it though.
On a whim, I deleted this(this) {} of D2D_POINT_2F in d2dbasetypes.d Then it worked
As for the problem with postblit ctor, they are kind of derprecated but I suspect it could be a compiler bug, without knowing your compiler version it not necessary to be the actual problem.
I found another crash issue and solved it, so I report it. This was easy because I found a note. in ID2D1Bitmap old => ref D2D1_SIZE_F GetSize() const; new => void GetSize(D2D1_SIZE_F* outSize) const;
the docs says the signature for this is D2D1_SIZE_F GetSize();, so it should work without ref, this could be a workaround in the due to ABI compatibility issues.
In any case if you want to see it fixed ASAP best thing would be to make pull request with your fixes.
Thank you for your reply I'm not in trouble, I can just change the local code I tried removing only the ref but it crashed I'm not familiar with github or dlang so I'm not confident about making a pull request
Ok, I quickly looked over the issue and it was there for quite some time.
The workaround is basically to define a helper method that uses working function to return struct by value.
here is an already existing example of the problem https://github.com/evilrat666/directx-d/blob/34ed9a5a4666dd04ce5fd389342633c11ed995d5/src/directx/d2d1.d#L3135-L3142
and this is the workaround https://github.com/evilrat666/directx-d/blob/34ed9a5a4666dd04ce5fd389342633c11ed995d5/src/directx/d2d1.d#L3601-L3626
Ideally of course the compiler should be fixed, realistically however this was broken for years so...
Anyway, if you are interested to contribute it is actually quite simple, here a short overview of the process:
-
click fork this repo on github interface, github will copy it to your account so you can push changes to it
-
if you have already cloned repo locally all you need is to add new origin pointing to your own fork on github
-
make some changes, commit them to a new branch with descriptive name, and push them to your own github fork
-
you can now go to your branch a click open pull request button so I can merge your changes, if for example you later found out there is some mistakes in that changes you can git commit ammend to add more changes to last commit or git reset and commit again to rewrite local history, then do git force push to overwrite changes in your branch (it will automatically be reflected in open PR).
This should provide some insight on how it works in general.
Thank you for the detailed lecture. I might try it out if I feel like it. My skills are poor and this is the first time I've heard of ABI.