diff --git a/app/meson.build b/app/meson.build index 87dbcff3..cada95f7 100644 --- a/app/meson.build +++ b/app/meson.build @@ -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') diff --git a/app/src/main.c b/app/src/main.c index c1e02e2e..852815e1 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -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;