From a8aa3d39b704451ee7077c54eae20c99a1f9dc6c Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 9 Feb 2018 09:43:58 +0100 Subject: [PATCH] Send "screen on" command only on mouse down Avoid to send the command twice, once on mouse down, once on mouse up. --- app/src/screencontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/screencontrol.c b/app/src/screencontrol.c index 4ba434bb..20f173fc 100644 --- a/app/src/screencontrol.c +++ b/app/src/screencontrol.c @@ -177,7 +177,7 @@ void screencontrol_handle_mouse_motion(struct controller *controller, void screencontrol_handle_mouse_button(struct controller *controller, struct screen *screen, const SDL_MouseButtonEvent *event) { - if (event->button == SDL_BUTTON_RIGHT) { + if (event->button == SDL_BUTTON_RIGHT && event->type == SDL_MOUSEBUTTONDOWN) { turn_screen_on(controller); return; };