Re: [2/2] ddraw: Rename IDirectDraw functions (try 2)
Hi Michael, I think it would be better to fix function names in IDirectDraw7. Christian Michael Karcher a écrit :
The functions implementing IDirectDraw are called IDirectDrawImpl_Foo, the ones implementing IDirectDraw7 are called alike. As they are static functions in different files, the compiler has no problems distinguishing them, but it confuses the reader of TRACE messages. --- dlls/ddraw/ddraw_thunks.c | 92 ++++++++++++++++++++++---------------------- 1 files changed, 46 insertions(+), 46 deletions(-)
------------------------------------------------------------------------
Am Sonntag, 1. Juni 2008 00:13:22 schrieb Christian Costa:
Hi Michael,
I think it would be better to fix function names in IDirectDraw7. The IDirectDraw7 functions are without a version number because they're the common implementation for all ddraw versions. If there's a specific function for IDirectDraw7 that is not called by older versions via thunk due to behavior differences, it is already called IDirectDraw7Impl_XYZ
Am Sonntag, den 01.06.2008, 00:47 +0200 schrieb Stefan Dösinger:
Am Sonntag, 1. Juni 2008 00:13:22 schrieb Christian Costa:
Hi Michael,
I think it would be better to fix function names in IDirectDraw7. The IDirectDraw7 functions are without a version number because they're the common implementation for all ddraw versions. If there's a specific function for IDirectDraw7 that is not called by older versions via thunk due to behavior differences, it is already called IDirectDraw7Impl_XYZ
No, it isn't. Take a look at DirectDrawImpl_AddRef and DirectDrawImpl_Release. I can submit an alternative patch that instead of renaming the DirectDraw(1) functions renames these two DirectDraw7 functions, which also resolves the confusing debug logs. I know, if you look carefully, you can distinguish them by the message "IDirectDraw7 refcount" or "IDirectDraw refcount", but even here it is non-obvious that the IDirectDraw refcount is not connected to the interface in ddraw.c where all the functions are called IDirectDrawImpl_Foo. Another alternative would be to leave function naming as is, and make sure that *all* functions in ddraw_thunk.c are reporting through the ddraw_thunk channel, which my patch [1/2] removes. I still prefer personally a solution that does rename functions to makes function names unique. It helps for setting breakpoints. Regards, Michael Karcher
Stefan Dösinger a écrit :
Am Sonntag, 1. Juni 2008 00:13:22 schrieb Christian Costa:
Hi Michael,
I think it would be better to fix function names in IDirectDraw7.
The IDirectDraw7 functions are without a version number because they're the common implementation for all ddraw versions. If there's a specific function for IDirectDraw7 that is not called by older versions via thunk due to behavior differences, it is already called IDirectDraw7Impl_XYZ
The problem is that makes the confusion with version 1 even with Mickael's patch. In Direct3D thunks, we avoided that by moving the number after the impl, setting the version 1 explicitely and prefixing by Thunks (ex: Thunk_IDirect3DDeviceImpl_1_xxx). So I suggest to use the same naming scheme. Christian
participants (3)
-
Christian Costa -
Michael Karcher -
Stefan Dösinger