Display and control your Android device
Fix scrcpy() return value
Romain Vimont5eb91a4ca784
diff --git a/app/src/main.c b/app/src/main.cindex 6e0557a1..7ab41b75 100644--- a/app/src/main.c+++ b/app/src/main.c@@ -183,8 +183,6 @@ static int parse_args(struct args *args, int argc, char *argv[]) {}int main(int argc, char *argv[]) {- int res;-struct args args = {.serial = NULL,.help = SDL_FALSE,@@ -210,7 +208,7 @@ int main(int argc, char *argv[]) {SDL_LogSetAllPriority(SDL_LOG_PRIORITY_DEBUG);- res = scrcpy(args.serial, args.port, args.max_size, args.bit_rate) ? 0 : 1;+ int res = scrcpy(args.serial, args.port, args.max_size, args.bit_rate) ? 0 : 1;avformat_network_deinit(); // ignore failurediff --git a/app/src/scrcpy.c b/app/src/scrcpy.cindex c971556f..dc46ef40 100644--- a/app/src/scrcpy.c+++ b/app/src/scrcpy.c@@ -519,7 +519,7 @@ void event_loop(void) {}SDL_bool scrcpy(const char *serial, Uint16 local_port, Uint16 max_size, Uint32 bit_rate) {- SDL_bool ret = 0;+ SDL_bool ret = SDL_TRUE;process_t push_proc = push_server(serial);if (wait_for_success(push_proc, "adb push")) {