Move misplaced break statements
With ifdefs, the resulting code could contain both a return statement and a break.
This commit is contained in:
parent
e0bce1725b
commit
5d6076bffd
1 changed files with 4 additions and 4 deletions
|
@ -1320,12 +1320,12 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||||
case 'K':
|
case 'K':
|
||||||
#ifdef HAVE_AOA_HID
|
#ifdef HAVE_AOA_HID
|
||||||
opts->keyboard_input_mode = SC_KEYBOARD_INPUT_MODE_HID;
|
opts->keyboard_input_mode = SC_KEYBOARD_INPUT_MODE_HID;
|
||||||
|
break;
|
||||||
#else
|
#else
|
||||||
LOGE("HID over AOA (-K/--hid-keyboard) is not supported on "
|
LOGE("HID over AOA (-K/--hid-keyboard) is not supported on "
|
||||||
"this platform. It is only available on Linux.");
|
"this platform. It is only available on Linux.");
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
case OPT_MAX_FPS:
|
case OPT_MAX_FPS:
|
||||||
if (!parse_max_fps(optarg, &opts->max_fps)) {
|
if (!parse_max_fps(optarg, &opts->max_fps)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1339,12 +1339,12 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||||
case 'M':
|
case 'M':
|
||||||
#ifdef HAVE_AOA_HID
|
#ifdef HAVE_AOA_HID
|
||||||
opts->mouse_input_mode = SC_MOUSE_INPUT_MODE_HID;
|
opts->mouse_input_mode = SC_MOUSE_INPUT_MODE_HID;
|
||||||
|
break;
|
||||||
#else
|
#else
|
||||||
LOGE("HID over AOA (-M/--hid-mouse) is not supported on this"
|
LOGE("HID over AOA (-M/--hid-mouse) is not supported on this"
|
||||||
"platform. It is only available on Linux.");
|
"platform. It is only available on Linux.");
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
case OPT_LOCK_VIDEO_ORIENTATION:
|
case OPT_LOCK_VIDEO_ORIENTATION:
|
||||||
if (!parse_lock_video_orientation(optarg,
|
if (!parse_lock_video_orientation(optarg,
|
||||||
&opts->lock_video_orientation)) {
|
&opts->lock_video_orientation)) {
|
||||||
|
@ -1503,21 +1503,21 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||||
case OPT_V4L2_SINK:
|
case OPT_V4L2_SINK:
|
||||||
#ifdef HAVE_V4L2
|
#ifdef HAVE_V4L2
|
||||||
opts->v4l2_device = optarg;
|
opts->v4l2_device = optarg;
|
||||||
|
break;
|
||||||
#else
|
#else
|
||||||
LOGE("V4L2 (--v4l2-sink) is only available on Linux.");
|
LOGE("V4L2 (--v4l2-sink) is only available on Linux.");
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
case OPT_V4L2_BUFFER:
|
case OPT_V4L2_BUFFER:
|
||||||
#ifdef HAVE_V4L2
|
#ifdef HAVE_V4L2
|
||||||
if (!parse_buffering_time(optarg, &opts->v4l2_buffer)) {
|
if (!parse_buffering_time(optarg, &opts->v4l2_buffer)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
#else
|
#else
|
||||||
LOGE("V4L2 (--v4l2-buffer) is only available on Linux.");
|
LOGE("V4L2 (--v4l2-buffer) is only available on Linux.");
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
// getopt prints the error message on stderr
|
// getopt prints the error message on stderr
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue