dsound: return success in IDirectSoundBufferImpl_AcquireResources

Chris Robinson chris.kcat at gmail.com
Wed May 11 09:29:22 CDT 2011


On Wednesday, May 11, 2011 6:40:42 AM Joerg-Cyril.Hoehle at t-systems.com wrote:
> Several bugs were fixed by returning the success value that apps would get
> on native, instead of returning the value that would be consistent with
> the specification and implementation state in Wine, e.g. NOTSUPPORTED,
> ERR_NOTIMPLEMENTED etc.

That's not fixing bugs, that's hiding them. :) The bug is that the function is 
not implemented/supported, not that the function is being truthful with its 
return value, and simply changing the return value doesn't fix that. Hence the 
bug is not fixed.

It actually kind of bothers me to see patches to "fix bugs" that only change 
the return value of a stub from error to success... returning success when the 
function doesn't work is itself a bug, and not any better than a hack, IMO. It 
can lead apps down a path that assume the function did what it was supposed 
to, when it really didn't, and trigger problems in unrelated code making it 
harder to track down the actual problem.

Especially as Wine tends to implement stuff on an as-needed basis, this leaves 
many stubs empty. If returning a failure code causes a problem, that's a sign 
that the stub should be properly filled out enough to satisfy it.



More information about the wine-devel mailing list