mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-30 22:05:12 +00:00
Expose adb executable path publicly
This will allow the caller to build the argv array directly.
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
|
||||
static const char *adb_executable;
|
||||
|
||||
static inline const char *
|
||||
get_adb_executable(void) {
|
||||
const char *
|
||||
sc_adb_get_executable(void) {
|
||||
if (!adb_executable) {
|
||||
adb_executable = getenv("ADB");
|
||||
if (!adb_executable)
|
||||
@@ -163,7 +163,7 @@ sc_adb_create_argv(const char *serial, const char *const adb_cmd[],
|
||||
return NULL;
|
||||
}
|
||||
|
||||
argv[0] = get_adb_executable();
|
||||
argv[0] = sc_adb_get_executable();
|
||||
int i;
|
||||
if (serial) {
|
||||
argv[1] = "-s";
|
||||
|
@@ -14,6 +14,9 @@
|
||||
|
||||
#define SC_ADB_SILENT (SC_ADB_NO_STDOUT | SC_ADB_NO_STDERR | SC_ADB_NO_LOGERR)
|
||||
|
||||
const char *
|
||||
sc_adb_get_executable(void);
|
||||
|
||||
sc_pid
|
||||
sc_adb_execute(const char *serial, const char *const adb_cmd[], size_t len,
|
||||
unsigned flags);
|
||||
|
Reference in New Issue
Block a user