[PATCH] dinput: WriteEffectToFIle dieffects parameter is const

Michael Stefaniuc mstefani at redhat.com
Tue Sep 22 02:37:27 CDT 2015


On 09/22/2015 08:08 AM, Marcus Meissner wrote:
> On Mon, Sep 21, 2015 at 06:18:13PM -0500, Ken Thomases wrote:
>> On Sep 21, 2015, at 5:50 PM, Nikolay Sivov <bunglehead at gmail.com> wrote:
>>>
>>> On 22.09.2015 0:06, Marcus Meissner wrote:
>>>> Signed-Off-By: Marcus Meissner <marcus at jet.franken.de>
>>>> ---
>>>>  dlls/dinput/device.c         | 4 ++--
>>>>  dlls/dinput/device_private.h | 4 ++--
>>>>  include/dinput.h             | 8 ++++----
>>>>  3 files changed, 8 insertions(+), 8 deletions(-)
>>>>
>>>
>>> PSDK header doesn't use const for that argument, I checked with Win10 SDK. Does it really make sense to diverge from it in this case?
>>
>> I think Marcus misunderstood Elias's earlier email about this.  Elias was pointing out that, while the _docs_ claim the parameter is const, it isn't actually declared that way in Microsoft's headers but is in Wine's headers (for IDirectInputDevice8::WriteEffectToFile()).  Apparently, Marcus thought he was saying it was the other way, so he "corrected" the wrong way.
> 
> 
> So what should we follow... The documentation or PSDK?
PSDK as we and others that want to use the Wine headers need to be able
to compile Win32 code unmodified.

> The const makes sense as this is a input parameter, but then "making sense" is of course optional in the Win32 api :)
The PSDK even keeps clear typos / copy and paste errors. There is a
struct that uses the wrong handle type for a field. Alexandre rejected
my patch to fix that one even though it wouldn't break the ABI and it
wouldn't be an API problem for mildly sane source code out there.

bye
	michael



More information about the wine-devel mailing list