Am Saturday 12 September 2009 23:50:47 schrieb Henri Verbeet:
2009/9/12 Stefan Dösinger stefan@codeweavers.com:
I wonder how this worked in the past, and why the compiler didn't complain.
It's pretty simple really, these functions don't need WINAPI because they're ddraw internal functions "cleverly" disguised as vtable methods. IIRC it's actually harmful to add WINAPI to these on OS X due to some obscure compiler bug.
Hmm, you realized this before I did.
Somehow adding WINAPI to those functions fixed the Xfire overlay, but I think this was purely (bad) luck because Xfire depends on the ddraw.dll/d3d8.dll/d3d9.dll load addresses.
Adding WINAPI at least hurts performance on OSX because it adds stack realignment code that adds extra opcodes and makes one register unuseable for the rest of the function....
Bottom line: We should rename those functions to make it more obvious that those aren't vtable functions.