Display and control your Android device
Improve resizing workaround
Romain Vimont92cb3a666109
diff --git a/app/src/scrcpy.c b/app/src/scrcpy.cindex 81f8239e..d557b208 100644--- a/app/src/scrcpy.c+++ b/app/src/scrcpy.c@@ -109,9 +109,10 @@ static intevent_watcher(void *data, SDL_Event *event) {(void) data;if (event->type == SDL_WINDOWEVENT- && event->window.event == SDL_WINDOWEVENT_RESIZED) {- // called from another thread, not very safe, but it's a workaround!- screen_render(&screen);+ && event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {+ // In practice, it seems to always be called from the same thread in+ // that specific case. Anyway, it's just a workaround.+ screen_handle_window_event(&screen, &event->window);}return 0;}