[PATCH 2/5] dinput: Stop and unload effect when freeing it.
Vitaliy Margolen
wine-patches at kievinfo.com
Tue Jul 8 20:12:54 CDT 2008
Daniel Remenak wrote:
> On Sat, Jul 5, 2008 at 9:24 PM, Vitaliy Margolen
> <wine-patches at kievinfo.com> wrote:
> <snip>
>> + LinuxInputEffectImpl_Stop(iface);
>> + LinuxInputEffectImpl_Unload(iface);
> <snip>
>
> Vitaliy,
>
> Native behavior is for Unload to stop the effect also (see msdn or
> test it yourself), so the call to Stop here is unnecessary. If the
> call to Stop is required, it must be done in Unload, not Release, as
> it's not unusual to unload an effect without releasing it when a game
> has a large number of available effect instances.
>
> It is my understanding that no explicit call to Stop is needed, either
> in Release or Unload, as evdev has the same behavior documented (see
> section 3.3 of ff.txt in the kernel docs).
>
> The call to Unload is certainly correct, and I don't think there's
> anything strictly wrong with calling Stop; just make sure it's not
> covering up a bug in Unload.
>
You probably right. I did not experiment a lot with force feedback. Was
trying to apply the same assumptions that exist in other places in dinput -
anything that's being freed first have to stop then remove itself from the
system.
Just trying to prevent any possible bugs that could be caused by not
stopping/unloading force feedback effects.
Vitaliy.
More information about the wine-devel
mailing list