Send "screen on" command only on mouse down
Avoid to send the command twice, once on mouse down, once on mouse up.
This commit is contained in:
parent
127e56780a
commit
a8aa3d39b7
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ void screencontrol_handle_mouse_motion(struct controller *controller,
|
||||||
void screencontrol_handle_mouse_button(struct controller *controller,
|
void screencontrol_handle_mouse_button(struct controller *controller,
|
||||||
struct screen *screen,
|
struct screen *screen,
|
||||||
const SDL_MouseButtonEvent *event) {
|
const SDL_MouseButtonEvent *event) {
|
||||||
if (event->button == SDL_BUTTON_RIGHT) {
|
if (event->button == SDL_BUTTON_RIGHT && event->type == SDL_MOUSEBUTTONDOWN) {
|
||||||
turn_screen_on(controller);
|
turn_screen_on(controller);
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue