mirror of https://github.com/Genymobile/scrcpy
Add compilation flag for USB features
This allows to disable HID/OTG features on Linux to build without libusb.
This commit is contained in:
parent
cc27771dd1
commit
ca9e1a0514
|
@ -74,7 +74,7 @@ if v4l2_support
|
|||
src += [ 'src/v4l2_sink.c' ]
|
||||
endif
|
||||
|
||||
usb_support = host_machine.system() == 'linux'
|
||||
usb_support = get_option('usb') and host_machine.system() == 'linux'
|
||||
if usb_support
|
||||
src += [
|
||||
'src/usb/aoa_hid.c',
|
||||
|
|
|
@ -1357,8 +1357,8 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
|||
opts->keyboard_input_mode = SC_KEYBOARD_INPUT_MODE_HID;
|
||||
break;
|
||||
#else
|
||||
LOGE("HID over AOA (-K/--hid-keyboard) is not supported on "
|
||||
"this platform. It is only available on Linux.");
|
||||
LOGE("HID over AOA (-K/--hid-keyboard) is disabled (or "
|
||||
"unsupported on this platform).");
|
||||
return false;
|
||||
#endif
|
||||
case OPT_MAX_FPS:
|
||||
|
@ -1376,8 +1376,8 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
|||
opts->mouse_input_mode = SC_MOUSE_INPUT_MODE_HID;
|
||||
break;
|
||||
#else
|
||||
LOGE("HID over AOA (-M/--hid-mouse) is not supported on this"
|
||||
"platform. It is only available on Linux.");
|
||||
LOGE("HID over AOA (-M/--hid-mouse) is disabled (or "
|
||||
"unsupported on this platform).");
|
||||
return false;
|
||||
#endif
|
||||
case OPT_LOCK_VIDEO_ORIENTATION:
|
||||
|
@ -1540,8 +1540,8 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
|||
opts->otg = true;
|
||||
break;
|
||||
#else
|
||||
LOGE("OTG mode (--otg) is not supported on this platform. It "
|
||||
"is only available on Linux.");
|
||||
LOGE("OTG mode (--otg) is disabled (or unsupported on this "
|
||||
"platform).");
|
||||
return false;
|
||||
#endif
|
||||
case OPT_V4L2_SINK:
|
||||
|
|
|
@ -5,3 +5,4 @@ option('portable', type: 'boolean', value: false, description: 'Use scrcpy-serve
|
|||
option('server_debugger', type: 'boolean', value: false, description: 'Run a server debugger and wait for a client to be attached')
|
||||
option('server_debugger_method', type: 'combo', choices: ['old', 'new'], value: 'new', description: 'Select the debugger method (Android < 9: "old", Android >= 9: "new")')
|
||||
option('v4l2', type: 'boolean', value: true, description: 'Enable V4L2 feature when supported')
|
||||
option('usb', type: 'boolean', value: true, description: 'Enable HID/OTG features when supported')
|
||||
|
|
Loading…
Reference in New Issue