@@ -545,12 +545,6 @@ static int open_hidraw(const char *configured_path, int expected_input,
545545 close (descriptor );
546546 descriptor = -1 ;
547547 }
548- if (result != 0 ) {
549- fprintf (stderr ,
550- "actions-micro: cannot find 185b:2d1d input%d: %s\n" ,
551- expected_input , strerror (- result ));
552- }
553-
554548 return result == 0 ? descriptor : result ;
555549}
556550
@@ -1238,10 +1232,12 @@ static void actions_close(void *context)
12381232 if (state -> hid [0 ] >= 0 ) {
12391233 close (state -> hid [0 ]);
12401234 }
1241- fprintf (stderr ,
1242- "actions-micro: closed frames=%llu reports=%llu\n" ,
1243- (unsigned long long )state -> frames ,
1244- (unsigned long long )state -> reports );
1235+ if (state -> frames != 0 || state -> reports != 0 ) {
1236+ fprintf (stderr ,
1237+ "actions-micro: closed frames=%llu reports=%llu\n" ,
1238+ (unsigned long long )state -> frames ,
1239+ (unsigned long long )state -> reports );
1240+ }
12451241 free (state -> encoder .encoded );
12461242 free (state -> encoder .packed_frame );
12471243 free (state -> bootstrap );
@@ -1327,7 +1323,8 @@ static int actions_open(const struct usbdisplay_backend_config *config,
13271323static const struct usbdisplay_backend_v1 actions_backend = {
13281324 .abi_version = USBDISPLAY_BACKEND_ABI_VERSION ,
13291325 .struct_size = sizeof (struct usbdisplay_backend_v1 ),
1330- .capabilities = USBDISPLAY_BACKEND_CAP_TICK ,
1326+ .capabilities = USBDISPLAY_BACKEND_CAP_TICK |
1327+ USBDISPLAY_BACKEND_CAP_PHYSICAL ,
13311328 .name = "actions-micro-185b-2d1d" ,
13321329 .open = actions_open ,
13331330 .submit = actions_submit ,
0 commit comments