Re: dinput: Support IUnknown in the IDirectInputEffect COM object.
On Tue, Mar 15, 2016 at 10:37:16AM +0100, Michael Stefaniuc wrote:
Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> --- dlls/dinput/joystick_osx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 6a8926d..19ca070 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -1474,7 +1474,7 @@ static HRESULT WINAPI effect_QueryInterface(IDirectInputEffect *iface,
TRACE("%p %s %p\n", This, debugstr_guid(guid), out);
- if(IsEqualIID(guid, &IID_IDirectInputEffect)){ + if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualIID(guid, &IID_IDirectInputEffect)){
It looks a bit strange to mix IsEqualGUID and IsEqualIID. Huw.
On 03/15/2016 10:54 AM, Huw Davies wrote:
On Tue, Mar 15, 2016 at 10:37:16AM +0100, Michael Stefaniuc wrote:
Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> --- dlls/dinput/joystick_osx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 6a8926d..19ca070 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -1474,7 +1474,7 @@ static HRESULT WINAPI effect_QueryInterface(IDirectInputEffect *iface,
TRACE("%p %s %p\n", This, debugstr_guid(guid), out);
- if(IsEqualIID(guid, &IID_IDirectInputEffect)){ + if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualIID(guid, &IID_IDirectInputEffect)){
It looks a bit strange to mix IsEqualGUID and IsEqualIID. Duh, missed that. Copy and paste for the win! Which one do we prefer? Not that it really matters.
There is also a similar GUID / IID inconsistency in the QI method declaration. Some use REFGUID the others REFIID or const GUID*... PITA for my coccinelle scripts. bye michael
On Tue, Mar 15, 2016 at 11:08:16AM +0100, Michael Stefaniuc wrote:
On 03/15/2016 10:54 AM, Huw Davies wrote:
On Tue, Mar 15, 2016 at 10:37:16AM +0100, Michael Stefaniuc wrote:
Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> --- dlls/dinput/joystick_osx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 6a8926d..19ca070 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -1474,7 +1474,7 @@ static HRESULT WINAPI effect_QueryInterface(IDirectInputEffect *iface,
TRACE("%p %s %p\n", This, debugstr_guid(guid), out);
- if(IsEqualIID(guid, &IID_IDirectInputEffect)){ + if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualIID(guid, &IID_IDirectInputEffect)){
It looks a bit strange to mix IsEqualGUID and IsEqualIID. Duh, missed that. Copy and paste for the win! Which one do we prefer? Not that it really matters.
I slightly prefer IsEqualIID for iids, but I don't think we should go around changing them all. Huw.
On 03/15/2016 11:21 AM, Huw Davies wrote:
On Tue, Mar 15, 2016 at 11:08:16AM +0100, Michael Stefaniuc wrote:
On 03/15/2016 10:54 AM, Huw Davies wrote:
On Tue, Mar 15, 2016 at 10:37:16AM +0100, Michael Stefaniuc wrote:
Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> --- dlls/dinput/joystick_osx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 6a8926d..19ca070 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -1474,7 +1474,7 @@ static HRESULT WINAPI effect_QueryInterface(IDirectInputEffect *iface,
TRACE("%p %s %p\n", This, debugstr_guid(guid), out);
- if(IsEqualIID(guid, &IID_IDirectInputEffect)){ + if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualIID(guid, &IID_IDirectInputEffect)){
It looks a bit strange to mix IsEqualGUID and IsEqualIID. Duh, missed that. Copy and paste for the win! Which one do we prefer? Not that it really matters.
I slightly prefer IsEqualIID for iids, but I don't think we should go around changing them all. That wasn't my intention. But if we already touch the respective line that can be fixed too.
bye michael
participants (2)
-
Huw Davies -
Michael Stefaniuc