From 8a3c6a3ae718e53aafc98f97014980a06307328d Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 14 Mar 2018 09:31:16 +0100 Subject: [PATCH] Remove useless argument Do not pass any data to the event watcher, it is unused. --- 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 cc4528df..4dd480b6 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -45,7 +45,7 @@ static struct input_manager input_manager = { // // // -static int event_watcher(void* data, SDL_Event* event) { +static int event_watcher(void *data, SDL_Event *event) { 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); @@ -56,7 +56,7 @@ static int event_watcher(void* data, SDL_Event* event) { static void event_loop(void) { #ifdef CONTINUOUS_RESIZING_WORKAROUND - SDL_AddEventWatch(event_watcher, screen.window); + SDL_AddEventWatch(event_watcher, NULL); #endif SDL_Event event; while (SDL_WaitEvent(&event)) {