dinput: Add error check to silence a compiler warning.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
71ddc97b91
commit
6925fb0bb6
|
@ -298,10 +298,11 @@ static void assign_action(HWND dialog)
|
|||
int obj = lv_get_cur_item(dialog);
|
||||
int old_action = lv_get_item_data(dialog, obj);
|
||||
int used_obj;
|
||||
|
||||
DIDEVICEOBJECTINSTANCEW ddo = device->ddo[obj];
|
||||
DWORD type;
|
||||
|
||||
if (old_action == action) return;
|
||||
if (obj < 0) return;
|
||||
type = device->ddo[obj].dwType;
|
||||
|
||||
/* Clear old action */
|
||||
if (old_action != -1)
|
||||
|
@ -320,7 +321,7 @@ static void assign_action(HWND dialog)
|
|||
lv_set_action(dialog, used_obj, -1, lpdiaf);
|
||||
|
||||
/* Set new action */
|
||||
lpdiaf->rgoAction[action].dwObjID = ddo.dwType;
|
||||
lpdiaf->rgoAction[action].dwObjID = type;
|
||||
lpdiaf->rgoAction[action].guidInstance = device->ddi.guidInstance;
|
||||
lpdiaf->rgoAction[action].dwHow = DIAH_USERCONFIG;
|
||||
|
||||
|
|
Loading…
Reference in New Issue