Commit 6925fb0b authored by Alexandre Julliard's avatar Alexandre Julliard

dinput: Add error check to silence a compiler warning.

parent 71ddc97b
...@@ -298,10 +298,11 @@ static void assign_action(HWND dialog) ...@@ -298,10 +298,11 @@ static void assign_action(HWND dialog)
int obj = lv_get_cur_item(dialog); int obj = lv_get_cur_item(dialog);
int old_action = lv_get_item_data(dialog, obj); int old_action = lv_get_item_data(dialog, obj);
int used_obj; int used_obj;
DWORD type;
DIDEVICEOBJECTINSTANCEW ddo = device->ddo[obj];
if (old_action == action) return; if (old_action == action) return;
if (obj < 0) return;
type = device->ddo[obj].dwType;
/* Clear old action */ /* Clear old action */
if (old_action != -1) if (old_action != -1)
...@@ -320,7 +321,7 @@ static void assign_action(HWND dialog) ...@@ -320,7 +321,7 @@ static void assign_action(HWND dialog)
lv_set_action(dialog, used_obj, -1, lpdiaf); lv_set_action(dialog, used_obj, -1, lpdiaf);
/* Set new action */ /* Set new action */
lpdiaf->rgoAction[action].dwObjID = ddo.dwType; lpdiaf->rgoAction[action].dwObjID = type;
lpdiaf->rgoAction[action].guidInstance = device->ddi.guidInstance; lpdiaf->rgoAction[action].guidInstance = device->ddi.guidInstance;
lpdiaf->rgoAction[action].dwHow = DIAH_USERCONFIG; lpdiaf->rgoAction[action].dwHow = DIAH_USERCONFIG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment