@@ -386,7 +386,7 @@ static void hid_pad_init(struct hid_report_meta *meta, struct hid_report *report
386386 map -> desc [0 ] |= BIT (PAD_LX_LEFT ) | BIT (PAD_LX_RIGHT );
387387 meta -> hid_axes_idx [AXIS_LX ] = i ;
388388 if (report -> usages [i ].logical_min >= 0 ) {
389- map -> meta [AXIS_LX ].neutral = report -> usages [i ].logical_max / 2 ;
389+ map -> meta [AXIS_LX ].neutral = ( report -> usages [i ].logical_max / 2 ) + 1 ;
390390 }
391391 else {
392392 map -> meta [AXIS_LX ].neutral = 0 ;
@@ -399,7 +399,7 @@ static void hid_pad_init(struct hid_report_meta *meta, struct hid_report *report
399399 map -> desc [0 ] |= BIT (PAD_LY_DOWN ) | BIT (PAD_LY_UP );
400400 meta -> hid_axes_idx [AXIS_LY ] = i ;
401401 if (report -> usages [i ].logical_min >= 0 ) {
402- map -> meta [AXIS_LY ].neutral = report -> usages [i ].logical_max / 2 ;
402+ map -> meta [AXIS_LY ].neutral = ( report -> usages [i ].logical_max / 2 ) + 1 ;
403403 }
404404 else {
405405 map -> meta [AXIS_LY ].neutral = 0 ;
@@ -414,7 +414,7 @@ static void hid_pad_init(struct hid_report_meta *meta, struct hid_report *report
414414 map -> desc [0 ] |= BIT (PAD_RX_LEFT ) | BIT (PAD_RX_RIGHT );
415415 meta -> hid_axes_idx [AXIS_RX ] = i ;
416416 if (report -> usages [i ].logical_min >= 0 ) {
417- map -> meta [AXIS_RX ].neutral = report -> usages [i ].logical_max / 2 ;
417+ map -> meta [AXIS_RX ].neutral = ( report -> usages [i ].logical_max / 2 ) + 1 ;
418418 }
419419 else {
420420 map -> meta [AXIS_RX ].neutral = 0 ;
@@ -445,7 +445,7 @@ static void hid_pad_init(struct hid_report_meta *meta, struct hid_report *report
445445 map -> desc [0 ] |= BIT (PAD_RX_LEFT ) | BIT (PAD_RX_RIGHT );
446446 meta -> hid_axes_idx [AXIS_RX ] = i ;
447447 if (report -> usages [i ].logical_min >= 0 ) {
448- map -> meta [AXIS_RX ].neutral = report -> usages [i ].logical_max / 2 ;
448+ map -> meta [AXIS_RX ].neutral = ( report -> usages [i ].logical_max / 2 ) + 1 ;
449449 }
450450 else {
451451 map -> meta [AXIS_RX ].neutral = 0 ;
@@ -468,7 +468,7 @@ static void hid_pad_init(struct hid_report_meta *meta, struct hid_report *report
468468 map -> desc [0 ] |= BIT (PAD_RY_DOWN ) | BIT (PAD_RY_UP );
469469 meta -> hid_axes_idx [AXIS_RY ] = i ;
470470 if (report -> usages [i ].logical_min >= 0 ) {
471- map -> meta [AXIS_RY ].neutral = report -> usages [i ].logical_max / 2 ;
471+ map -> meta [AXIS_RY ].neutral = ( report -> usages [i ].logical_max / 2 ) + 1 ;
472472 }
473473 else {
474474 map -> meta [AXIS_RY ].neutral = 0 ;
@@ -484,7 +484,7 @@ static void hid_pad_init(struct hid_report_meta *meta, struct hid_report *report
484484 map -> desc [0 ] |= BIT (PAD_RY_DOWN ) | BIT (PAD_RY_UP );
485485 meta -> hid_axes_idx [AXIS_RY ] = i ;
486486 if (report -> usages [i ].logical_min >= 0 ) {
487- map -> meta [AXIS_RY ].neutral = report -> usages [i ].logical_max / 2 ;
487+ map -> meta [AXIS_RY ].neutral = ( report -> usages [i ].logical_max / 2 ) + 1 ;
488488 }
489489 else {
490490 map -> meta [AXIS_RY ].neutral = 0 ;
0 commit comments