From dd2a5c1ecf3fdcf26ef7123d30c934fa38c2d79f Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 25 Mar 2018 15:59:43 +0200 Subject: [PATCH] Disable "show touches" once window is closed If --show-touches is set, then the option must be disabled on quit. Since it executes an adb command, it takes some time, so close the window beforehand so that the close window button does not seem unresponsive. --- app/src/scrcpy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 6436afc7..eefb9a05 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -190,12 +190,12 @@ SDL_bool scrcpy(const struct scrcpy_options *options) { event_loop(); LOGD("quit..."); + screen_destroy(&screen); + if (options->show_touches) { LOGI("Disable show_touches"); set_show_touches_enabled(options->serial, SDL_FALSE); } - - screen_destroy(&screen); finally_stop_and_join_controller: controller_stop(&controller); controller_join(&controller);