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.
This commit is contained in:
Romain Vimont
2018-02-04 12:20:41 +01:00
parent 82ee55845c
commit 5eb91a4ca7
2 changed files with 2 additions and 4 deletions

View File

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