mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-30 19:22:05 +00:00
Configure log priority early
The log priority must be configured before parsing command-line arguments, in order to get logs as expected.
This commit is contained in:
parent
1eae139b6e
commit
024c2f7e6b
@ -37,6 +37,11 @@ main(int argc, char *argv[]) {
|
|||||||
setbuf(stdout, NULL);
|
setbuf(stdout, NULL);
|
||||||
setbuf(stderr, NULL);
|
setbuf(stderr, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_DEBUG);
|
||||||
|
#endif
|
||||||
|
|
||||||
struct scrcpy_cli_args args = {
|
struct scrcpy_cli_args args = {
|
||||||
.opts = SCRCPY_OPTIONS_DEFAULT,
|
.opts = SCRCPY_OPTIONS_DEFAULT,
|
||||||
.help = false,
|
.help = false,
|
||||||
@ -67,10 +72,6 @@ main(int argc, char *argv[]) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_DEBUG);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int res = scrcpy(&args.opts) ? 0 : 1;
|
int res = scrcpy(&args.opts) ? 0 : 1;
|
||||||
|
|
||||||
avformat_network_deinit(); // ignore failure
|
avformat_network_deinit(); // ignore failure
|
||||||
|
Loading…
Reference in New Issue
Block a user