Enable debug logs only for debug builds

In release mode, use the default log priorities.
This commit is contained in:
Romain Vimont 2018-02-12 11:07:38 +01:00
parent 2f3e00ed98
commit 4dbc450d01
2 changed files with 5 additions and 0 deletions

View file

@ -35,6 +35,9 @@ dependencies = [
conf = configuration_data()
# expose the build type
conf.set('BUILD_DEBUG', get_option('buildtype') == 'debug')
# the version, updated on release
conf.set_quoted('SCRCPY_VERSION', '0.1')

View file

@ -231,7 +231,9 @@ int main(int argc, char *argv[]) {
return 1;
}
#ifdef BUILD_DEBUG
SDL_LogSetAllPriority(SDL_LOG_PRIORITY_DEBUG);
#endif
int res = scrcpy(args.serial, args.port, args.max_size, args.bit_rate) ? 0 : 1;