@@ -858,7 +858,7 @@ static void set_abs_axis_value(struct unix_device *iface, int code, int value)
858858 if (impl -> is_gamepad )
859859 {
860860 hid_device_set_button (iface , 10 , value < 0 );
861- hid_device_set_button (iface , 11 , value > 0 );
861+ hid_device_set_button (iface , 12 , value > 0 );
862862 }
863863 hid_device_set_hatswitch_y (iface , code - 1 , value );
864864 }
@@ -867,8 +867,8 @@ static void set_abs_axis_value(struct unix_device *iface, int code, int value)
867867 if (!(code = impl -> hat_map [code - ABS_HAT0X ])) return ;
868868 if (impl -> is_gamepad )
869869 {
870- hid_device_set_button (iface , 12 , value < 0 );
871- hid_device_set_button (iface , 13 , value > 0 );
870+ hid_device_set_button (iface , 13 , value < 0 );
871+ hid_device_set_button (iface , 11 , value > 0 );
872872 }
873873 hid_device_set_hatswitch_x (iface , code - 1 , value );
874874 }
@@ -990,9 +990,9 @@ static BOOL set_report_from_event(struct unix_device *iface, struct input_event
990990 if (impl -> is_gamepad && !impl -> hat_count )
991991 {
992992 if (button == 11 ) hid_device_set_hatswitch_y (iface , 0 , -1 );
993- if (button == 12 ) hid_device_set_hatswitch_y (iface , 0 , +1 );
994- if (button == 13 ) hid_device_set_hatswitch_x (iface , 0 , -1 );
995- if (button == 14 ) hid_device_set_hatswitch_x (iface , 0 , +1 );
993+ if (button == 13 ) hid_device_set_hatswitch_y (iface , 0 , +1 );
994+ if (button == 14 ) hid_device_set_hatswitch_x (iface , 0 , -1 );
995+ if (button == 12 ) hid_device_set_hatswitch_x (iface , 0 , +1 );
996996 }
997997 hid_device_set_button (iface , button - 1 , ie -> value );
998998 return FALSE;
0 commit comments