Hello Vitaliy,
On 11/24/2011 06:28 PM, Vitaliy Margolen wrote:
dlls/dinput/dinput_main.c | 7 ++ dlls/dinput/dinput_private.h | 2 + dlls/dinput/joystick.c | 195 +++++++++++++++++++++++++++++++++ include/dinputd.h | 243 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 447 insertions(+), 0 deletions(-) create mode 100644 include/dinputd.h
we are trying to get rid off the LPJUNK, IDirectInputJoyConfig8 * is so much more nicer than LPDIRECTINPUTJOYCONFIG8.
While the above is more of a nit-pick (and an easy search and replace patch for me) the QueryInterface implementation is not correct: - Query for IID_IUnknown is not supported. - Use IDirectInputJoyConfig8_AddRef() on the interface without the cast - You can save the round trip over impl_from_IDirectInputJoyConfig8() as iface and &This->IDirectInputJoyConfig8_iface are the exact same thing.
bye michael
On 11/24/2011 12:27 PM, Michael Stefaniuc wrote:
Hello Vitaliy,
On 11/24/2011 06:28 PM, Vitaliy Margolen wrote:
dlls/dinput/dinput_main.c | 7 ++ dlls/dinput/dinput_private.h | 2 + dlls/dinput/joystick.c | 195 +++++++++++++++++++++++++++++++++ include/dinputd.h | 243 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 447 insertions(+), 0 deletions(-) create mode 100644 include/dinputd.h
we are trying to get rid off the LPJUNK, IDirectInputJoyConfig8 * is so much more nicer than LPDIRECTINPUTJOYCONFIG8.
IMHO - it's not. And it deviates from the PSDK headers, and the rest of the dinput. Not even saying that headers won't match declaration.
While the above is more of a nit-pick (and an easy search and replace patch for me) the QueryInterface implementation is not correct:
- Query for IID_IUnknown is not supported.
You right, will fix this.
- Use IDirectInputJoyConfig8_AddRef() on the interface without the cast
Will change that as well.
Vitaliy.
On 11/24/2011 08:46 PM, Vitaliy Margolen wrote:
On 11/24/2011 12:27 PM, Michael Stefaniuc wrote:
Hello Vitaliy,
On 11/24/2011 06:28 PM, Vitaliy Margolen wrote:
dlls/dinput/dinput_main.c | 7 ++ dlls/dinput/dinput_private.h | 2 + dlls/dinput/joystick.c | 195 +++++++++++++++++++++++++++++++++ include/dinputd.h | 243 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 447 insertions(+), 0 deletions(-) create mode 100644 include/dinputd.h
we are trying to get rid off the LPJUNK, IDirectInputJoyConfig8 * is so much more nicer than LPDIRECTINPUTJOYCONFIG8.
IMHO - it's not. And it deviates from the PSDK headers, and the rest of the dinput. Not even saying that headers won't match declaration.
I'm not talking about changing the headers but about the COM methods implementation. In addition to the usual complains about the LPJUNK typedefs in the case of COM interfaces there is also a loss of information as LPJUNK normally translates to JUNK*.
bye michael