Fix scrcpy() return value

The scrcpy() function returns a SDL_bool to indicate its success, but
was initialized to 0 (SDL_FALSE) instead of SDL_TRUE.
hidpi
Romain Vimont 6 years ago
parent 82ee55845c
commit 5eb91a4ca7

@ -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 failure

@ -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")) {

Loading…
Cancel
Save