dinput: Fix EnumObjects callback return value handling.
commitdcb84a45f69f57efeb547f11ed5a8474ee74de1e
authorFlorian Will <florian.will@gmail.com>
Sat, 1 Apr 2023 22:13:47 +0000 (2 00:13 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 3 Apr 2023 14:52:01 +0000 (3 16:52 +0200)
tree6da676f6d6a7adb2acf0c23044e4c02c8d23a767
parentc04319e5a09dc2b2e85beeada1c4bf5bc31b8519
dinput: Fix EnumObjects callback return value handling.

This solves an issue in ZUSI 3 settings for DirectInput devices. Delphi
defines the True value of the "C-compatible" LongBool type as -1, which
wine interpreted to mean DIENUM_STOP because it is != DIENUM_CONTINUE.
Change that logic so only an explicit DIENUM_STOP (= 0) return value
stops the enumeration of objects.
dlls/dinput/device.c
dlls/dinput/tests/device8.c