dinput: Dump the condition effect correctly for 2 array items.

Based on ideas by Elias Vanderstuyft.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2016-08-23 19:24:11 -03:00 committed by Alexandre Julliard
parent 97b5862e48
commit 777ca90601
1 changed files with 7 additions and 3 deletions

View File

@ -215,10 +215,14 @@ void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags)
_dump_DIRAMPFORCE(eff->lpvTypeSpecificParams);
}
} else if (type == DIEFT_CONDITION) {
if (eff->cbTypeSpecificParams != sizeof(DICONDITION)) {
WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n");
} else {
if (eff->cbTypeSpecificParams == sizeof(DICONDITION)) {
_dump_DICONDITION(eff->lpvTypeSpecificParams);
} else if (eff->cbTypeSpecificParams == 2 * sizeof(DICONDITION)) {
DICONDITION *condition = eff->lpvTypeSpecificParams;
_dump_DICONDITION(&condition[0]);
_dump_DICONDITION(&condition[1]);
} else {
WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n");
}
} else if (type == DIEFT_CUSTOMFORCE) {
if (eff->cbTypeSpecificParams != sizeof(DICUSTOMFORCE)) {